mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-06-06 14:15:50 +08:00
增加双因子验证提示
This commit is contained in:
@@ -45,7 +45,7 @@ public class TwoFactorHandlerInterceptorAdapter extends HandlerInterceptorAdapte
|
||||
code = request.getHeader(factor.parameter());
|
||||
}
|
||||
if (StringUtils.isEmpty(code)) {
|
||||
throw new NeedTwoFactorException("需要进行双重验证", factor.provider());
|
||||
throw new NeedTwoFactorException(factor.message(), factor.provider());
|
||||
} else if (!validator.verify(code, factor.timeout())) {
|
||||
throw new NeedTwoFactorException("验证码错误", factor.provider());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user