新oa待办跳转到待办页面bug修复11
This commit is contained in:
parent
4593cbc091
commit
f6e44f6f7d
|
@ -119,19 +119,24 @@ public class SSOPluginLogin implements ThirdSSOAuthHandler {
|
|||
result.setSucess(false);
|
||||
return result;
|
||||
}
|
||||
|
||||
String param = httpServletRequest.getParameter("param");
|
||||
//解码
|
||||
byte[] decodedBytes = Base64.getDecoder().decode(param);
|
||||
String paramString = new String(decodedBytes, StandardCharsets.UTF_8);
|
||||
try {
|
||||
//获取返回的 sessionId
|
||||
String sessionId = httpServletRequest.getParameter("sessionId");
|
||||
logger.info(String.format("getTrdSSOAuth→sessionId:%s", sessionId));
|
||||
//解码
|
||||
if(StringUtils.isNotEmpty(param) ){
|
||||
byte[] decodedBytes = Base64.getDecoder().decode(param);
|
||||
String paramString = new String(decodedBytes, StandardCharsets.UTF_8);
|
||||
//二次重定向到待办页面,并且修改EOSS返回的sessionId的key值
|
||||
try {
|
||||
httpServletResponse.sendRedirect(httpServletRequest.getRequestURI() + "?" + paramString + "&code=" + code+"&eossSessionId="+sessionId);
|
||||
} catch (IOException e) {
|
||||
logger.info(String.format("getTrdSSOAuth→sendRedirect异常:%s", httpServletRequest.getRequestURI() + "?" + paramString + "&code=" + code+"&eossSessionId="+sessionId));
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
//二次重定向进入解
|
||||
if (StringUtils.isNotEmpty(code) && sessionId == null) {
|
||||
if (StringUtils.isNotEmpty(code) && StringUtils.isNotEmpty(sessionId) ) {
|
||||
//调用EOSS获取token接口
|
||||
String access_token = AuthService.accessToken(code, ip, client, secret);
|
||||
logger.info(String.format("getTrdSSOAuth→accessToken返回数据:%s", access_token));
|
||||
|
@ -150,10 +155,6 @@ public class SSOPluginLogin implements ThirdSSOAuthHandler {
|
|||
}else{
|
||||
result.setSucess(false);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.error("二次重定向到待办页面异常!" + e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue