forked from TrueCloudLab/frostfs-sdk-go
4c779423f5
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
20 lines
422 B
Go
20 lines
422 B
Go
package bearertest
|
|
|
|
import (
|
|
"github.com/TrueCloudLab/frostfs-sdk-go/bearer"
|
|
eacltest "github.com/TrueCloudLab/frostfs-sdk-go/eacl/test"
|
|
usertest "github.com/TrueCloudLab/frostfs-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
|
|
}
|