forked from TrueCloudLab/frostfs-api-go
[#17] acl: Add impersonate flag to bearer token
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
5f318f0b75
commit
b3ccd0166f
6 changed files with 80 additions and 40 deletions
14
acl/types.go
14
acl/types.go
|
@ -52,6 +52,8 @@ type BearerTokenBody struct {
|
|||
ownerID *refs.OwnerID
|
||||
|
||||
lifetime *TokenLifetime
|
||||
|
||||
impersonate bool
|
||||
}
|
||||
|
||||
type BearerToken struct {
|
||||
|
@ -340,6 +342,18 @@ func (bt *BearerTokenBody) SetLifetime(v *TokenLifetime) {
|
|||
bt.lifetime = v
|
||||
}
|
||||
|
||||
func (bt *BearerTokenBody) GetImpersonate() bool {
|
||||
if bt != nil {
|
||||
return bt.impersonate
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func (bt *BearerTokenBody) SetImpersonate(v bool) {
|
||||
bt.impersonate = v
|
||||
}
|
||||
|
||||
func (bt *BearerToken) GetBody() *BearerTokenBody {
|
||||
if bt != nil {
|
||||
return bt.body
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue