根据前一篇单点登录流程:https://blog.csdn.net/vtopqx/article/details/104833853
下面是单点登录具体参数请求实现流程:
登录:
1、访问系统A:http://www.system.a.com
2、获取用户信息:post http://www.system.a.com/api/activity/center/getCurrentUser
3、退出登录:post http://www.system.a.com/api/loginOut
4、访问验证中心:get http://sso.system.com/sso/index => http://sso.system.com/index.html?redirectUrl=http://www.system.a.com/
5、验证中心登录:post http://sso.system.com/sso/login
参数:username=342&password=xxx
返回:{"code":"0","msg":"success","data":"ST_90c0ff8529a04ade90823877cc19be66"}
6、将令牌返回系统A首页:GET http://www.system.a.com/?st=ST_90c0ff8529a04ade90823877cc19be66
7、登录系统A并验证令牌:POST http://www.system.a.com/api/login =>http://sso.system.com/sso/verifyST
参数:{"st":"ST_90c0ff8529a04ade90823877cc19be66"}
8、获取用户信息:POST http://www.system.a.com/api/activity/center/getCurrentUser
注销:
1、注销系统A:http://www.system.a.com/api/loginOut
{"userId":"342"}
2、注销验证中心:http://sso.system.com/index.html?action=logout&redirectUrl=http://www.system.a.com
Cookie: gtc_name=tgc_90c0f998f850496593fb7724529cc719
3、返回验证中心登录页:GET http://sso.system.com/sso/index => http://sso.system.com/index.html?redirectUrl=http://www.system.a.com/