From 46e743cb842f1ba36cb1fe5032bfd0f48f220cd8 Mon Sep 17 00:00:00 2001 From: WenC <450292408@qq.com> Date: Tue, 9 Apr 2024 16:05:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../login/phone/auth/LoginPhoneAuthFilter.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/cn/com/tenlion/operator/login/phone/auth/LoginPhoneAuthFilter.java b/src/main/java/cn/com/tenlion/operator/login/phone/auth/LoginPhoneAuthFilter.java index a88e2e5..0f61dbb 100644 --- a/src/main/java/cn/com/tenlion/operator/login/phone/auth/LoginPhoneAuthFilter.java +++ b/src/main/java/cn/com/tenlion/operator/login/phone/auth/LoginPhoneAuthFilter.java @@ -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);