|
@ -337,11 +337,11 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
|
String key = parameters.get("key");
|
|
|
String text = parameters.get("text");
|
|
|
|
|
|
// if(org.apache.commons.lang3.StringUtils.isNotBlank(key)&& org.apache.commons.lang3.StringUtils.isNotBlank(text)){
|
|
|
// if(!verifyCaptcha(key,text)){
|
|
|
// throw new ImgCaptchaException("验证码错误!");
|
|
|
// }
|
|
|
// }
|
|
|
if(org.apache.commons.lang3.StringUtils.isNotBlank(key)&& org.apache.commons.lang3.StringUtils.isNotBlank(text)){
|
|
|
if(!verifyCaptcha(key,text)){
|
|
|
throw new ImgCaptchaException("验证码错误!");
|
|
|
}
|
|
|
}
|
|
|
logger.info("login:登录进入2");
|
|
|
|
|
|
String flag = parameters.get("flag");
|
|
@ -409,11 +409,10 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
|
if (!testPwd(parameters.get("password"))) {
|
|
|
throw new PwdException("密码强度低,请用验证码登录,或者修改密码后在重新登录!");
|
|
|
}else {
|
|
|
|
|
|
KeyPair keyPair = (KeyPair) httpSession.getAttribute("privateKey");
|
|
|
String password = com.yihu.jw.security.utils.RSAUtils.decryptBase64(parameters.get("password"), keyPair);
|
|
|
parameters.put("password", password);
|
|
|
}
|
|
|
// KeyPair keyPair = (KeyPair) httpSession.getAttribute("privateKey");
|
|
|
// String password = com.yihu.jw.security.utils.RSAUtils.decryptBase64(parameters.get("password"), keyPair);
|
|
|
// parameters.put("password", password);
|
|
|
}else if (StringUtils.isEmpty(parameters.get("captcha"))) {
|
|
|
parameters.put("grant_type", "password");
|
|
|
//解密密码
|