세션 provider, consumer 인터페이스 변경
This commit is contained in:
@ -49,7 +49,7 @@ func MakeAuthrizationFromStringMap(src map[string]string) Authorization {
|
||||
|
||||
type Provider interface {
|
||||
New(*Authorization) (string, error)
|
||||
Invalidate(primitive.ObjectID) error
|
||||
RevokeAll(primitive.ObjectID) error
|
||||
Query(string) (Authorization, error)
|
||||
Touch(string) (bool, error)
|
||||
}
|
||||
@ -57,7 +57,8 @@ type Provider interface {
|
||||
type Consumer interface {
|
||||
Query(string) (Authorization, error)
|
||||
Touch(string) (Authorization, error)
|
||||
IsInvalidated(primitive.ObjectID) bool
|
||||
IsRevoked(primitive.ObjectID) bool
|
||||
Revoke(string)
|
||||
RegisterOnSessionInvalidated(func(primitive.ObjectID))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user