优化结构

This commit is contained in:
Yvan
2026-08-24 21:50:33 +08:00
parent d3c20c578f
commit 969afee284
20 changed files with 497 additions and 244 deletions
+10
View File
@@ -270,6 +270,16 @@ func (uc *SecurityUsecase) RotateActiveToken(ctx context.Context, username, oldT
func (uc *SecurityUsecase) UseMultipoint() bool { return uc.settings.UseMultipoint() }
// TokenDisabled reports whether the token sits on the revocation blacklist. The
// blacklist belongs to the token usecase; exposing it here keeps authentication
// from reaching through this usecase into another one's dependencies.
func (uc *SecurityUsecase) TokenDisabled(ctx context.Context, token string) (bool, error) {
if uc == nil || uc.tokens == nil {
return false, nil
}
return uc.tokens.IsTokenDisabled(ctx, token)
}
func (uc *SecurityUsecase) CaptchaRuntimeSettings() CaptchaSettings {
return uc.settings.CaptchaSettings()
}