From 0a44401a5ab2917e0530bbe269b22cc5b275e0c7 Mon Sep 17 00:00:00 2001 From: owan Date: Tue, 12 Nov 2024 18:10:49 +0800 Subject: [PATCH] =?UTF-8?q?EOSS-=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81-=E9=87=8D=E5=AE=9A=E5=90=91EOSS=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/shkd/sys/sys/eoss/SSOPluginLogin.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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 4ea3f0f..0c6164d 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 @@ -40,7 +40,9 @@ public class SSOPluginLogin implements ThirdSSOAuthHandler { public void callTrdSSOLogin(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, String s) { //认证中心的登录地址 logger.info(String.format("eoss_ip:%s,client_id:%s,client_secret:%s,重定向地址:%s",EOSS_IP,CLIENT_ID,CLIENT_SECRET,s)); + try { + String ssourl= EOSS_IP+"/service/SGE-project-sctz-master/pc/dist/login.html"; if (httpServletRequest.getRequestURI().contains("/auth/logout.do")){ String userName = UserServiceHelper.getCurrentUser("name").getString("name"); DistributeSessionlessCache cache = CacheFactory.getCommonCacheFactory().getDistributeSessionlessCache("customRegion"); @@ -49,14 +51,14 @@ public class SSOPluginLogin implements ThirdSSOAuthHandler { if (sessionId != null) { AuthService.logout(EOSS_IP, sessionId); } + }else{ + /** + *重定向的统一认证的地址 获取授权码 + */ + ssourl=String.format("%s/sso2/authCenter/authorize?client_id=%s&response_type=code&authType=0&redirect_uri=%s", + EOSS_IP,CLIENT_ID,s); + logger.info(String.format("重定向地址→sendRedirect:%s",ssourl)); } - - /** - *重定向的统一认证的地址 获取授权码 - */ - String ssourl=String.format("%s/sso2/authCenter/authorize?client_id=%s&response_type=code&authType=0&redirect_uri=%s", - EOSS_IP,CLIENT_ID,s); - logger.info(String.format("重定向地址→sendRedirect:%s",ssourl)); httpServletResponse.sendRedirect(ssourl); } catch (IOException e) { throw new RuntimeException(e);