|
|
@ -26,25 +26,30 @@ public class WebLoginController extends Controller {
|
|
|
|
redirect("/html/login.html");
|
|
|
|
redirect("/html/login.html");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* http://10.10.21.21:9001/dsssoserver/login?redirect_url=https://www.ccsjy.cn/QingLong/loginPerson/getCaptcha
|
|
|
|
|
|
|
|
测试账号:stu81
|
|
|
|
|
|
|
|
测试密码:632342
|
|
|
|
|
|
|
|
* @param redirect_url
|
|
|
|
|
|
|
|
*/
|
|
|
|
@Before({GET.class})
|
|
|
|
@Before({GET.class})
|
|
|
|
@EmptyInterface({"redirect_url"})
|
|
|
|
@EmptyInterface({"redirect_url"})
|
|
|
|
public void login(String redirect_url) {
|
|
|
|
public void login(String redirect_url) {
|
|
|
|
Set<String> _set = RedisKit.SMembers(PropKit.get("SYS_JRXT"));
|
|
|
|
// Set<String> _set = RedisKit.SMembers(PropKit.get("SYS_JRXT"));
|
|
|
|
boolean found = false;
|
|
|
|
// boolean found = false;
|
|
|
|
for (String s : _set) {
|
|
|
|
// for (String s : _set) {
|
|
|
|
if (redirect_url.contains(s)) {
|
|
|
|
// if (redirect_url.contains(s)) {
|
|
|
|
found = true;
|
|
|
|
// found = true;
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (!found) {
|
|
|
|
// if (!found) {
|
|
|
|
JSONObject resultJson = new JSONObject();
|
|
|
|
// JSONObject resultJson = new JSONObject();
|
|
|
|
resultJson.put("success", false);
|
|
|
|
// resultJson.put("success", false);
|
|
|
|
resultJson.put("msg", "回调地址不在指定的IP或域名范围内!");
|
|
|
|
// resultJson.put("msg", "回调地址不在指定的IP或域名范围内!");
|
|
|
|
renderJson(resultJson);
|
|
|
|
// renderJson(resultJson);
|
|
|
|
return;
|
|
|
|
// return;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
Kv kv = SsoLoginHelper.loginCheck(getRequest());
|
|
|
|
Kv kv = SsoLoginHelper.loginCheck(getRequest());
|
|
|
|
if (kv.getBoolean("success")) {
|
|
|
|
if (kv.getBoolean("success")) {
|
|
|
|
String ssoSessionId = PropKit.get("sso.sessionid");
|
|
|
|
String ssoSessionId = PropKit.get("sso.sessionid");
|
|
|
@ -193,6 +198,7 @@ public class WebLoginController extends Controller {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* WEB登出
|
|
|
|
* WEB登出
|
|
|
|
|
|
|
|
* http://10.10.21.21:9001/dsssoserver/logout?redirect_url=http://10.10.21.21:9001/dsssoserver
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Before({GET.class})
|
|
|
|
@Before({GET.class})
|
|
|
|
@EmptyInterface({"redirect_url"})
|
|
|
|
@EmptyInterface({"redirect_url"})
|
|
|
|