main
黄海 7 months ago
parent 88c6bb4102
commit 74dd58578a

@ -41,6 +41,15 @@ public class WebLoginController extends Controller {
*
*/
public void login(String redirect_url) {
//检查重定向地址是不是有效
if (lm.getSystemByRedirectUrl(redirect_url) == null) {
JSONObject resultJson = new JSONObject();
resultJson.put("success", false);
resultJson.put("msg", "输入的回调地址并不在允许接入的业务系统范围内,请先联系管理员添加到接入系统中再试!");
renderJson(resultJson);
return;
}
Map<String, String> loginMap = SsoLoginHelper.loginCheck(getRequest());
if (loginMap != null) {
if (!redirect_url.contains("?")) {
@ -49,14 +58,7 @@ public class WebLoginController extends Controller {
redirect301(redirect_url + "&" + PropKit.get("sso.sessionid") + "=" + loginMap.get("session_id").toString());
}
} else {
//检查重定向地址是不是有效
if (lm.getSystemByRedirectUrl(redirect_url) == null) {
JSONObject resultJson = new JSONObject();
resultJson.put("success", false);
resultJson.put("msg", "输入的回调地址并不在允许接入的业务系统范围内,请先联系管理员添加到接入系统中再试!");
renderJson(resultJson);
return;
}
redirect_url = CommonUtil.handleRedirectUrlParas(redirect_url);
redirect("/html/login.html?redirect_url=" + redirect_url);
}

Loading…
Cancel
Save