|
@@ -189,8 +189,7 @@ public class SysLoginService {
|
|
if (!smsCode.equalsIgnoreCase(code)) {
|
|
if (!smsCode.equalsIgnoreCase(code)) {
|
|
throw new CaptchaException();
|
|
throw new CaptchaException();
|
|
}
|
|
}
|
|
-
|
|
+
|
|
- redisCache.deleteObject(verifyKey);
|
|
|
|
Authentication authentication = null;
|
|
Authentication authentication = null;
|
|
try {
|
|
try {
|
|
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(phone, Constants.CUSTOM_LOGIN_SMS);
|
|
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(phone, Constants.CUSTOM_LOGIN_SMS);
|
|
@@ -208,6 +207,8 @@ public class SysLoginService {
|
|
}
|
|
}
|
|
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
|
|
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
|
|
recordLoginInfo(loginUser.getUserId());
|
|
recordLoginInfo(loginUser.getUserId());
|
|
|
|
+
|
|
|
|
+ redisCache.deleteObject(verifyKey);
|
|
|
|
|
|
return tokenService.createToken(loginUser);
|
|
return tokenService.createToken(loginUser);
|
|
}
|
|
}
|