2022-03-24 08:05:41 +00:00
|
|
|
package bearertest
|
|
|
|
|
|
|
|
import (
|
2023-03-07 11:20:03 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/bearer"
|
|
|
|
eacltest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/eacl/test"
|
|
|
|
usertest "git.frostfs.info/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)
|
2023-11-21 08:35:10 +00:00
|
|
|
t.ForUser(usertest.ID())
|
2022-03-24 08:05:41 +00:00
|
|
|
t.SetEACLTable(*eacltest.Table())
|
|
|
|
|
|
|
|
return t
|
|
|
|
}
|