2022-03-24 08:05:41 +00:00
|
|
|
package bearertest
|
|
|
|
|
|
|
|
import (
|
2022-12-13 14:36:35 +00:00
|
|
|
"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"
|
2022-03-24 08:05:41 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Token returns random bearer.Token.
|
|
|
|
//
|
|
|
|
// Resulting token is unsigned.
|
|
|
|
func Token() (t bearer.Token) {
|
2022-06-01 10:39:33 +00:00
|
|
|
t.SetExp(3)
|
|
|
|
t.SetNbf(2)
|
|
|
|
t.SetIat(1)
|
|
|
|
t.ForUser(*usertest.ID())
|
2022-03-24 08:05:41 +00:00
|
|
|
t.SetEACLTable(*eacltest.Table())
|
|
|
|
|
|
|
|
return t
|
|
|
|
}
|