c65be6d469
Sync lifetime names with `session` package. Add `AssertContainer` and `AssertUser` methods which cover specific cases describe in protocol. Increase test coverage. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
20 lines
407 B
Go
20 lines
407 B
Go
package bearertest
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neofs-sdk-go/bearer"
|
|
eacltest "github.com/nspcc-dev/neofs-sdk-go/eacl/test"
|
|
usertest "github.com/nspcc-dev/neofs-sdk-go/user/test"
|
|
)
|
|
|
|
// Token returns random bearer.Token.
|
|
//
|
|
// Resulting token is unsigned.
|
|
func Token() (t bearer.Token) {
|
|
t.SetExp(3)
|
|
t.SetNbf(2)
|
|
t.SetIat(1)
|
|
t.ForUser(*usertest.ID())
|
|
t.SetEACLTable(*eacltest.Table())
|
|
|
|
return t
|
|
}
|