优化单点登录步骤

This commit is contained in:
click33
2021-07-09 02:31:34 +08:00
parent 0a5c5da4b4
commit 936dfe333d
34 changed files with 206 additions and 264 deletions

View File

@@ -22,13 +22,13 @@ public class SsoClientController {
public String index() {
String str = "<h2>Sa-Token SSO-Client 应用端</h2>" +
"<p>当前会话是否登录:" + StpUtil.isLogin() + "</p>" +
"<p><a href=\"javascript:location.href='/ssoLogin?back=' + encodeURIComponent(location.href);\">登录</a>" +
" <a href='/ssoLogout' target='_blank'>注销</a></p>";
"<p><a href=\"javascript:location.href='/sso/login?back=' + encodeURIComponent(location.href);\">登录</a>" +
" <a href='/sso/logout' target='_blank'>注销</a></p>";
return str;
}
// SSO-Client端处理所有SSO相关请求
@RequestMapping("/sso*")
@RequestMapping("/sso/*")
public Object ssoRequest() {
return SaSsoHandle.clientRequest();
}

View File

@@ -13,15 +13,15 @@ sa-token:
# SSO-相关配置
sso:
# SSO-Server端 单点登录地址
auth-url: http://sa-sso-server.com:9000/ssoAuth
auth-url: http://sa-sso-server.com:9000/sso/auth
# 使用Http请求校验ticket
is-http: true
# SSO-Server端 ticket校验地址
check-ticket-url: http://sa-sso-server.com:9000/ssoCheckTicket
check-ticket-url: http://sa-sso-server.com:9000/sso/checkTicket
# 打开单点注销功能
is-slo: true
# 单点注销地址
slo-url: http://sa-sso-server.com:9000/ssoLogout
slo-url: http://sa-sso-server.com:9000/sso/logout
# 接口调用秘钥
secretkey: kQwIOrYvnXmSDkwEiFngrKidMcdrgKor