session consumer query함수 리턴 값의 애매함을 제거
This commit is contained in:
@ -32,8 +32,8 @@ func (auth *Authorization) ToStrings() []string {
|
||||
}
|
||||
}
|
||||
|
||||
func (auth *Authorization) Invalidated() bool {
|
||||
return len(auth.invalidated) > 0
|
||||
func (auth *Authorization) Valid() bool {
|
||||
return len(auth.invalidated) == 0 && !auth.Account.IsZero()
|
||||
}
|
||||
|
||||
func MakeAuthrizationFromStringMap(src map[string]string) Authorization {
|
||||
@ -55,7 +55,7 @@ type Provider interface {
|
||||
}
|
||||
|
||||
type Consumer interface {
|
||||
Query(string) (Authorization, error)
|
||||
Query(string) Authorization
|
||||
Touch(string) (Authorization, error)
|
||||
IsRevoked(primitive.ObjectID) bool
|
||||
Revoke(string)
|
||||
|
||||
Reference in New Issue
Block a user