From d55b0db5f58709988ea9d9c92d4a5caedf5d0ad8 Mon Sep 17 00:00:00 2001 From: smallchill Date: Tue, 22 Mar 2022 18:18:41 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=20Oauth2=20=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E7=A0=81=E6=A8=A1=E5=BC=8F=E5=A4=B1=E6=95=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../springblade/auth/service/BladeUserDetailsServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetailsServiceImpl.java b/blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetailsServiceImpl.java index 0efbd1ce..f2b840da 100644 --- a/blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetailsServiceImpl.java +++ b/blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetailsServiceImpl.java @@ -117,7 +117,7 @@ public class BladeUserDetailsServiceImpl implements UserDetailsService { throw new UsernameNotFoundException(TokenUtil.USER_NOT_FOUND); } // 用户存在但密码错误,超过次数则锁定账号 - if (!grantType.equals(TokenUtil.REFRESH_TOKEN_KEY) && !user.getPassword().equals(DigestUtil.hex(password))) { + if (grantType != null && !grantType.equals(TokenUtil.REFRESH_TOKEN_KEY) && !user.getPassword().equals(DigestUtil.hex(password))) { setFailCount(tenantId, username, count); throw new UsernameNotFoundException(TokenUtil.USER_NOT_FOUND); }