[#17] acl: Add impersonate flag to bearer token

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
Denis Kirillov 2023-02-21 11:23:08 +03:00
parent 5f318f0b75
commit b3ccd0166f
6 changed files with 80 additions and 40 deletions

View file

@ -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