LiTaohong 5 년 전
부모
커밋
e8c905ad72
1개의 변경된 파일3개의 추가작업 그리고 6개의 파일을 삭제
  1. 3 6
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

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

@ -123,12 +123,9 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
            parameters.put("grant_type", "password");
            //解密密码
            if (parameters.get("password") != null) {
//                RSAPrivateKey rsaPrivateKey = (RSAPrivateKey)httpSession.getAttribute("privateKey");
//                KeyPair keyPair = (KeyPair) httpSession.getAttribute("privateKey");
//                parameters.put("password", RSAUtils.decryptByPrivateKey(parameters.get("password"), rsaPrivateKey));
//                String password = com.yihu.jw.security.utils.RSAUtils.decryptBase64(parameters.get("password"), keyPair);
//                parameters.put("password", password);
//                parameters.put("password", RSAUtils.decryptByPrivateKey(parameters.get("password"), rsaPrivateKey));
                KeyPair keyPair = (KeyPair) httpSession.getAttribute("privateKey");
                String password = com.yihu.jw.security.utils.RSAUtils.decryptBase64(parameters.get("password"), keyPair);
                parameters.put("password", password);
            } else {
                parameters.put("grant_type", "ihealthCode");
            }