diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/eoss/AuthService.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/eoss/AuthService.java index 2958b89..45ac4c8 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/eoss/AuthService.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/eoss/AuthService.java @@ -29,7 +29,6 @@ public class AuthService { public static String accessToken(String code,String eoss_ip,String client_id,String client_secret) { HttpHeaders api_headers = new HttpHeaders();//请求头 api_headers.add("Content-Type", "application/json; charset=utf-8"); -// String param= String.format("client_id=%s&client_secret=%s&grant_type=code&authType=0&code= %s",CLIENT_ID,CLIENT_SECRET,code); HashMap requestBody = new HashMap<>(); requestBody.put("client_id", client_id); requestBody.put("client_secret", client_secret); diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/eoss/SSOPluginLogin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/eoss/SSOPluginLogin.java index 31c7016..2d46954 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/eoss/SSOPluginLogin.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/eoss/SSOPluginLogin.java @@ -33,6 +33,7 @@ public class SSOPluginLogin implements ThirdSSOAuthHandler { */ @Override public void callTrdSSOLogin(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, String s) { + s = "http://10.1.7.85:8022/ierp/auth/callbackTrdSSO.do?tenantNo=ctsk-dev&sandboxNo=2063179586270661632"; //认证中心的登录地址 logger.info(String.format("eoss_ip:%s,client_id:%s,client_secret:%s,重定向地址:%s",EOSS_IP,CLIENT_ID,CLIENT_SECRET,s)); try { @@ -40,8 +41,8 @@ public class SSOPluginLogin implements ThirdSSOAuthHandler { /** * 获取授权码 */ - String ssourl=String.format("%s/sso2/authCenter/authorize?client_id=%s&response_type=code&authType=0redirect_uri=%s", - EOSS_IP,CLIENT_ID,s); + String ssourl=String.format("%s/sso2/authCenter/authorize?client_id=%s&response_type=code&authType=0&redirect_uri=%s", + EOSS_IP,CLIENT_ID,EOSS_IP); logger.info(String.format("重定向地址→sendRedirect:%s",ssourl)); httpServletResponse.sendRedirect(ssourl); } catch (IOException e) {