|
@ -323,14 +323,14 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
public ResponseEntity<Oauth2Envelop<WlyyUserSimple>> login(@RequestParam Map<String, String> parameters, HttpSession httpSession) throws Exception {
|
|
public ResponseEntity<Oauth2Envelop<WlyyUserSimple>> login(@RequestParam Map<String, String> parameters, HttpSession httpSession) throws Exception {
|
|
logger.info("login:登录进入1");
|
|
logger.info("login:登录进入1");
|
|
//图形验证码验证
|
|
//图形验证码验证
|
|
// 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("验证码错误!");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
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("验证码错误!");
|
|
|
|
}
|
|
|
|
}
|
|
logger.info("login:登录进入2");
|
|
logger.info("login:登录进入2");
|
|
|
|
|
|
String flag = parameters.get("flag");
|
|
String flag = parameters.get("flag");
|
|
@ -380,9 +380,9 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
parameters.put("grant_type", "password");
|
|
parameters.put("grant_type", "password");
|
|
//解密密码
|
|
//解密密码
|
|
if (parameters.get("password") != null) {
|
|
if (parameters.get("password") != null) {
|
|
// KeyPair keyPair = (KeyPair) httpSession.getAttribute("privateKey");
|
|
|
|
// String password = com.yihu.jw.security.utils.RSAUtils.decryptBase64(parameters.get("password"), keyPair);
|
|
|
|
parameters.put("password", "jkzl@2020");
|
|
|
|
|
|
KeyPair keyPair = (KeyPair) httpSession.getAttribute("privateKey");
|
|
|
|
String password = com.yihu.jw.security.utils.RSAUtils.decryptBase64(parameters.get("password"), keyPair);
|
|
|
|
parameters.put("password", password);
|
|
} else {
|
|
} else {
|
|
//第三方同步账号模式登录
|
|
//第三方同步账号模式登录
|
|
parameters.put("grant_type", "ihealthCode");
|
|
parameters.put("grant_type", "ihealthCode");
|