Commit f78fda3d authored by 喻春霖's avatar 喻春霖

fixed

parent 5e67dc08
...@@ -509,6 +509,12 @@ public class AuthController { ...@@ -509,6 +509,12 @@ public class AuthController {
private String generateSpLogoutUrl(String returnUrl, String oauthType) { private String generateSpLogoutUrl(String returnUrl, String oauthType) {
if (oauthType.equals("qpjy")){
returnUrl = "https://idp.qpedu.cn/logout/logout.html?redirect_url=" + URLEncoder.encode(returnUrl);
returnUrl = "https://sp.etextbook.cn/Shibboleth.sso/Logout?return=" + URLEncoder.encode(returnUrl);
return returnUrl;
}
StringBuilder loginUrlBuilder = new StringBuilder(); StringBuilder loginUrlBuilder = new StringBuilder();
OauthConfigItem oauthConfigItem = oauthConfig.getItems().get(oauthType); OauthConfigItem oauthConfigItem = oauthConfig.getItems().get(oauthType);
...@@ -526,11 +532,6 @@ public class AuthController { ...@@ -526,11 +532,6 @@ public class AuthController {
String clientId = oauthConfigItem.getClientId(); String clientId = oauthConfigItem.getClientId();
String signOrigin = oauthConfigItem.getClientId() + "$$" + oauthConfigItem.getClientSecret(); String signOrigin = oauthConfigItem.getClientId() + "$$" + oauthConfigItem.getClientSecret();
String md5Hex = EncodeUtil.md5(signOrigin); String md5Hex = EncodeUtil.md5(signOrigin);
if (oauthType.equals("qpjy")){
service = "https://idp.qpedu.cn/logout/logout.html?redirect_url=" + URLEncoder.encode(service);
service = "https://sp.etextbook.cn/Shibboleth.sso/Logout?return=" + URLEncoder.encode(service);
return service;
}
loginUrlBuilder.append("logout?service=").append(URLEncoder.encode(service)); loginUrlBuilder.append("logout?service=").append(URLEncoder.encode(service));
loginUrlBuilder.append("&client_id="+clientId); loginUrlBuilder.append("&client_id="+clientId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment