feat: implement precise token logout
This commit is contained in:
@@ -147,6 +147,11 @@ func (ta *authenticator) Authenticate(ctx auth.AuthContext, token []byte) (*auth
|
||||
|
||||
features := auth.Feature(tl.Features)
|
||||
if features&auth.FeatureNoLogin == 0 {
|
||||
if revoked, enabled, err := store.IsLoginTokenRevoked(types.TenantID(tl.TenantID), token); err != nil {
|
||||
return nil, nil, err
|
||||
} else if enabled && revoked {
|
||||
return nil, nil, types.ErrFailed
|
||||
}
|
||||
if store.Security == nil {
|
||||
return nil, nil, types.ErrInternal
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user