Ver código fonte

Merge branch 'dev' of trick9191/wlyy2.0 into dev

trick9191 5 anos atrás
pai
commit
d90ac1f985

+ 3 - 3
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -757,12 +757,12 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        if (StringUtils.isEmpty(code)) {
            throw new InvalidRequestException("doctor is null");
        }
//        KeyPair keyPair = (KeyPair) httpSession.getAttribute("privateKey");
//        String doctorCode = com.yihu.jw.security.utils.RSAUtils.decryptBase64(code, keyPair);
        KeyPair keyPair = (KeyPair) httpSession.getAttribute("privateKey");
        String doctorCode = com.yihu.jw.security.utils.RSAUtils.decryptBase64(code, keyPair);
        JSONObject map = null;
        try{
            map= oauthWlyyConfigService.checkWlyyDoctor(code);
            map= oauthWlyyConfigService.checkWlyyDoctor(doctorCode);
        }catch (Exception e){
            logger.error(e);
            return ObjEnvelop.getError("授权失败");

+ 1 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/service/OauthWlyyConfigService.java

@ -45,7 +45,7 @@ public class OauthWlyyConfigService {
    public JSONObject checkWlyyDoctor(String code)throws Exception{
        OauthWlyyConfigDO oauthWlyyConfigDO = oauthWlyyConfigDao.findOne("test");
        OauthWlyyConfigDO oauthWlyyConfigDO = oauthWlyyConfigDao.findOne("wlyyConfig");
        //token获取accesstoken
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("appid", oauthWlyyConfigDO.getAppId()));