删除注释

This commit is contained in:
WenC 2024-04-09 16:05:51 +08:00
parent 594a732d14
commit 46e743cb84

View File

@ -32,13 +32,13 @@ public class LoginPhoneAuthFilter extends AbstractAuthenticationProcessingFilter
if (StringUtils.isBlank(code)) {
throw new UserAuthenticationException("验证码不能为空");
}
// String verifyCode = smsService.getVerifyCode(phone);
// if (StringUtils.isBlank(verifyCode)) {
// throw new UserAuthenticationException("验证码错误");
// }
// if (!StringUtils.equals(code, verifyCode)) {
// throw new UserAuthenticationException("验证码不匹配");
// }
String verifyCode = smsService.getVerifyCode(phone);
if (StringUtils.isBlank(verifyCode)) {
throw new UserAuthenticationException("验证码错误");
}
if (!StringUtils.equals(code, verifyCode)) {
throw new UserAuthenticationException("验证码不匹配");
}
LoginPhoneAuthToken loginPhoneAuthToken = new LoginPhoneAuthToken(phone, null);
loginPhoneAuthToken.setDetails(authenticationDetailsSource.buildDetails(request));
return this.getAuthenticationManager().authenticate(loginPhoneAuthToken);