session consumer query함수 리턴 값의 애매함을 제거

This commit is contained in:
2025-08-15 23:55:50 +09:00
parent c0ab2afcf4
commit c24d387761
6 changed files with 40 additions and 56 deletions

View File

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