EOSS-退出登录代码-重定向EOSS地址修改
This commit is contained in:
parent
21c09d2be3
commit
0a44401a5a
|
@ -40,7 +40,9 @@ public class SSOPluginLogin implements ThirdSSOAuthHandler {
|
||||||
public void callTrdSSOLogin(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, String s) {
|
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));
|
logger.info(String.format("eoss_ip:%s,client_id:%s,client_secret:%s,重定向地址:%s",EOSS_IP,CLIENT_ID,CLIENT_SECRET,s));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
String ssourl= EOSS_IP+"/service/SGE-project-sctz-master/pc/dist/login.html";
|
||||||
if (httpServletRequest.getRequestURI().contains("/auth/logout.do")){
|
if (httpServletRequest.getRequestURI().contains("/auth/logout.do")){
|
||||||
String userName = UserServiceHelper.getCurrentUser("name").getString("name");
|
String userName = UserServiceHelper.getCurrentUser("name").getString("name");
|
||||||
DistributeSessionlessCache cache = CacheFactory.getCommonCacheFactory().getDistributeSessionlessCache("customRegion");
|
DistributeSessionlessCache cache = CacheFactory.getCommonCacheFactory().getDistributeSessionlessCache("customRegion");
|
||||||
|
@ -49,14 +51,14 @@ public class SSOPluginLogin implements ThirdSSOAuthHandler {
|
||||||
if (sessionId != null) {
|
if (sessionId != null) {
|
||||||
AuthService.logout(EOSS_IP, sessionId);
|
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);
|
httpServletResponse.sendRedirect(ssourl);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
Loading…
Reference in New Issue