单点登录成功没有回跳地址时,跳转upms首页

This commit is contained in:
shuzheng 2017-02-05 23:37:10 +08:00
parent d7747abe46
commit 26ac0cf5f6
1 changed files with 12 additions and 7 deletions

View File

@ -175,15 +175,20 @@ public class SSOController {
// token校验值
RedisUtil.set(token, token, TIMEOUT);
// 回调子系统
String redirectUrl = backurl;
if (backurl.contains("?")) {
redirectUrl += "&token=" + token;
if (StringUtils.isEmpty(backurl)) {
result.put("result", true);
result.put("data", "/");
} else {
redirectUrl += "?token=" + token;
String redirectUrl = backurl;
if (backurl.contains("?")) {
redirectUrl += "&token=" + token;
} else {
redirectUrl += "?token=" + token;
}
_log.info("认证中心帐号通过带token回跳{}", redirectUrl);
result.put("result", true);
result.put("data", redirectUrl);
}
_log.info("认证中心帐号通过带token回跳{}", redirectUrl);
result.put("result", true);
result.put("data", redirectUrl);
return result;
}