feat: implement precise token logout

This commit is contained in:
richjohnrambo
2026-09-10 09:43:02 +08:00
parent 98234db263
commit 6b2f1e06e0
8 changed files with 107 additions and 15 deletions
+5
View File
@@ -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
}