Browse Source

🐛 修复 Oauth2 授权码模式失效的问题

test
smallchill 3 years ago
parent
commit
d55b0db5f5
  1. 2
      blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetailsServiceImpl.java

2
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);
}

Loading…
Cancel
Save