⚡ 移动端密码错误不锁定用户

This commit is contained in:
lbw committed 2023-06-26 19:22:20 +08:00
1 parent 0aef68f55a
commit 44f473ba27
1 file changed
+4 -2
@@ -88,8 +88,10 @@ public class PigxAuthenticationFailureEventHandler implements AuthenticationFail
if (OAuth2ParameterNames.PASSWORD.equals(grantType)) {
String username = request.getParameter(OAuth2ParameterNames.USERNAME);
// 密码错误记录错误次数
if (exception instanceof OAuth2AuthenticationException) {
// 密码错误记录错误次数 (TOC用户不记录)
String header = WebUtils.getRequest().getHeader(SecurityConstants.HEADER_TOC);
if (exception instanceof OAuth2AuthenticationException
&& !SecurityConstants.HEADER_TOC_YES.equals(header)) {
recordLoginFailureTimes(username);
}