2022-03-24 08:05:41 +00:00
|
|
|
package bearertest
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neofs-sdk-go/bearer"
|
|
|
|
eacltest "github.com/nspcc-dev/neofs-sdk-go/eacl/test"
|
2022-04-11 06:30:22 +00:00
|
|
|
usertest "github.com/nspcc-dev/neofs-sdk-go/user/test"
|
2022-03-24 08:05:41 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Token returns random bearer.Token.
|
|
|
|
//
|
|
|
|
// Resulting token is unsigned.
|
|
|
|
func Token() (t bearer.Token) {
|
|
|
|
t.SetExpiration(3)
|
|
|
|
t.SetNotBefore(2)
|
|
|
|
t.SetIssuedAt(1)
|
2022-04-11 06:30:22 +00:00
|
|
|
t.SetOwnerID(*usertest.ID())
|
2022-03-24 08:05:41 +00:00
|
|
|
t.SetEACLTable(*eacltest.Table())
|
|
|
|
|
|
|
|
return t
|
|
|
|
}
|