From f198d19b1de861409022fb768a5d7074364d66ff Mon Sep 17 00:00:00 2001 From: owan Date: Fri, 8 Nov 2024 19:14:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=AE=9A=E5=90=91=E7=BC=BA=E5=B0=91&?= =?UTF-8?q?=E7=AC=A6=E5=8F=B7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/shkd/sys/sys/eoss/AuthService.java | 1 - .../src/main/java/shkd/sys/sys/eoss/SSOPluginLogin.java | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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) {