forked from TrueCloudLab/frostfs-api-go
service: define BearerToken interface
This commit is contained in:
parent
4709d46292
commit
55c3b714c0
3 changed files with 302 additions and 0 deletions
|
@ -267,3 +267,37 @@ type RequestVerifyData interface {
|
|||
RequestData
|
||||
SignKeyPairSource
|
||||
}
|
||||
|
||||
// ACLRulesSource is an interface of the container of binary extended ACL rules with read access.
|
||||
type ACLRulesSource interface {
|
||||
GetACLRules() []byte
|
||||
}
|
||||
|
||||
// ACLRulesContainer is an interface of the container of binary extended ACL rules.
|
||||
type ACLRulesContainer interface {
|
||||
ACLRulesSource
|
||||
SetACLRules([]byte)
|
||||
}
|
||||
|
||||
// BearerTokenInfo is an interface of a fixed set of Bearer token information value containers.
|
||||
// Contains:
|
||||
// - binary extended ACL rules;
|
||||
// - expiration epoch number;
|
||||
// - ID of the token's owner.
|
||||
type BearerTokenInfo interface {
|
||||
ACLRulesContainer
|
||||
ExpirationEpochContainer
|
||||
OwnerIDContainer
|
||||
}
|
||||
|
||||
// BearerToken is an interface of Bearer token information and key-signature pair.
|
||||
type BearerToken interface {
|
||||
BearerTokenInfo
|
||||
OwnerKeyContainer
|
||||
SignatureContainer
|
||||
}
|
||||
|
||||
// BearerTokenSource is an interface of the container of a BearerToken with read access.
|
||||
type BearerTokenSource interface {
|
||||
GetBearerToken() BearerToken
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue