优化结构
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user