代码调整
This commit is contained in:
@@ -48,8 +48,11 @@ public class CaptchaTokenGranter extends AbstractTokenGranter {
|
||||
Map<String, String> parameters = new LinkedHashMap<>(tokenRequest.getRequestParameters());
|
||||
String username = parameters.get(SecurityConstants.USERNAME);
|
||||
username = DesUtils.aesDecrypt(username);
|
||||
if (!judgeImageCode(parameters.get(SecurityConstants.IMAGE_CODE), RequestUtil.getRequest())) {
|
||||
throw new BusinessException(UserResponseEnum.LOGIN_WRONG_CODE);
|
||||
String verifyCode = parameters.get(SecurityConstants.VERIFY_CODE);
|
||||
if(StrUtil.isEmpty(verifyCode)||verifyCode.equals("1")){
|
||||
if (!judgeImageCode(parameters.get(SecurityConstants.IMAGE_CODE), RequestUtil.getRequest())) {
|
||||
throw new BusinessException(UserResponseEnum.LOGIN_WRONG_CODE);
|
||||
}
|
||||
}
|
||||
String password = parameters.get(SecurityConstants.PASSWORD);
|
||||
String ip = RequestUtil.getRequest().getHeader(SecurityConstants.REQUEST_HEADER_KEY_CLIENT_REAL_IP);
|
||||
|
||||
Reference in New Issue
Block a user