mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-11 05:19:00 +08:00
⚡ 移动端密码错误不锁定用户
This commit is contained in:
1 parent
0aef68f55a
commit
44f473ba27
1 file changed
+4
-2
+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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user