SSO协议规范可分为三个部分:
1 用户认证流程
2 用户登陆流程
3 用户退出流程
本文讲第一点
用户认证流程:
1: http request
浏览器 to sso client(service)
url:http://ssoclient
http response
sso client to 浏览器(302跳转到ssoserver)
Location:http://ssoserver?service=http://ssoclient
2:http request
浏览器 - sso server
http://ssoserver?service=http://ssoclient
response (登陆页面)
http://ssoserver/login.html
3:浏览器 - sso server
http request
http://ssoserver/login.html?username=xuly&password=123456&service=http://ssoclient
response
Set-Cookie:设置TGC [b](这个是核心)[/b]
Location:http://ssoclient?ticket=$#^%#^%#^ [b](登陆成功直接颁发ticket)[/b]
4 浏览器 - ssoclient
http request
http://ssoclient?ticket=$#^%#^%#^
response
在第5步解释
5 ssoclient - ssoserver (在CASFilter中执行这次请求)
http request
http://ssoserver/proxyValidate?ticket=464243&service=http://ssoclient/ddd
response
返回username等信息
1 用户认证流程
2 用户登陆流程
3 用户退出流程
本文讲第一点
用户认证流程:
1: http request
浏览器 to sso client(service)
url:http://ssoclient
http response
sso client to 浏览器(302跳转到ssoserver)
Location:http://ssoserver?service=http://ssoclient
2:http request
浏览器 - sso server
http://ssoserver?service=http://ssoclient
response (登陆页面)
http://ssoserver/login.html
3:浏览器 - sso server
http request
http://ssoserver/login.html?username=xuly&password=123456&service=http://ssoclient
response
Set-Cookie:设置TGC [b](这个是核心)[/b]
Location:http://ssoclient?ticket=$#^%#^%#^ [b](登陆成功直接颁发ticket)[/b]
4 浏览器 - ssoclient
http request
http://ssoclient?ticket=$#^%#^%#^
response
在第5步解释
5 ssoclient - ssoserver (在CASFilter中执行这次请求)
http request
http://ssoserver/proxyValidate?ticket=464243&service=http://ssoclient/ddd
response
返回username等信息