|
@ -639,16 +639,20 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
|
try{
|
|
|
OauthKeypairDO keypairDO = oauthKeypairDao.findByCode("hwlyyKey");
|
|
|
KeyPair keyPair = (KeyPair)SerializeUtil.unSerialize(keypairDO.getKeyPair());
|
|
|
logger.info("keyPair : "+keyPair.getPublic().toString());
|
|
|
//解密idcard,中山医院id通过openid获取,i健康通过直接加密传输
|
|
|
if(org.apache.commons.lang3.StringUtils.isNotBlank(idcard)){
|
|
|
rs.put("idcard",com.yihu.jw.security.utils.RSAUtils.decryptBase64(idcard, keyPair));
|
|
|
}else {
|
|
|
rs.put("idcard",idcard);
|
|
|
}
|
|
|
|
|
|
logger.info("参数 code : "+code);
|
|
|
//解析code
|
|
|
if(org.apache.commons.lang3.StringUtils.isNotBlank(code)){
|
|
|
rs.put("code",com.yihu.jw.security.utils.RSAUtils.decryptBase64(code, keyPair));
|
|
|
logger.info("解析前code : "+code);
|
|
|
String c = com.yihu.jw.security.utils.RSAUtils.decryptBase64(code, keyPair);
|
|
|
logger.info("解析前code : "+c);
|
|
|
rs.put("code",c);
|
|
|
}else {
|
|
|
rs.put("code",code);
|
|
|
}
|
|
@ -757,9 +761,10 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
|
if (StringUtils.isEmpty(code)) {
|
|
|
throw new InvalidRequestException("doctor is null");
|
|
|
}
|
|
|
logger.info("origin doctorCode :"+code);
|
|
|
KeyPair keyPair = (KeyPair) httpSession.getAttribute("privateKey");
|
|
|
String doctorCode = com.yihu.jw.security.utils.RSAUtils.decryptBase64(code, keyPair);
|
|
|
|
|
|
logger.info("after doctorCode :"+doctorCode);
|
|
|
JSONObject map = null;
|
|
|
try{
|
|
|
map= oauthWlyyConfigService.checkWlyyDoctor(doctorCode);
|