cas单点登录基本流程

还有很多细节,待完善

st=>start: Start|past ulogin=>operation: 用户请求app服务器任意需要登录页面 www.appserver1.com/testpage|past hasLogin=>condition: 是否已经登录? toFuncPage=>operation: 直接进入请求页面|approved retRedirToCasLoginPage=>operation: 返回重定向到cas server登录页面 302 www.casserver.com/login param service=http://www.appserver1.com|rejected requestCasLoginpage=>operation: 请求cas server登录页面|past isServiceValid=>condition: 验证service参数 是否有效 loginFail=>operation: 登录失败|rejected isTgtIsExist=>condition: tgt(ticketGrantingTicket) 是否存在?|approved generateLoginTicket=>operation: 生成LoginTicket| rejected returnLoginView=>operation: 返回LoginView with lt lt=lt-xxxxxxx|past doLogin=>operation: 用户输入用户名密码登录|past verifyLoginTicket=>condition: lt是否有效 generateTgt=>operation: 生成tgt(会验证用户名密码是否有效)|past isGenTgtSuccess=>condition: 成功? addTgtCookie=>operation: 将tgt添加到cookie|past isTgtIsValid=>condition: tgt是否未过期?|approved destoryInvalidTgt=>operation: 销毁无效的tgt|rejected generateServiceTicket=>operation: 生成st|past retRedirectToApp1ServerLogin=>operation: 返回重定向到app1 server 登录回调 302 www.appserver1.com/login with st=st-123456|past requestAppServer=>operation: 请求www.appserver1.com/login|past reqVerifySt=>operation: 请求cas server 验证st|past isStValid=>condition: st是否有效 retStValid=>operation: st有效|past retStInValid=>operation: st无效|past loginSuccess=>operation: 登录成功|past sub1=>subroutine: My Subroutine|rejected c2=>condition: Good idea|invalid op2=>operation: Stuff|current io=>inputoutput: catch something...|request st->ulogin->hasLogin hasLogin(yes, right)->toFuncPage hasLogin(no)->retRedirToCasLoginPage->requestCasLoginpage->isServiceValid isServiceValid(no, right)->loginFail isServiceValid(yes)->isTgtIsExist isTgtIsExist(no)->generateLoginTicket->returnLoginView->doLogin->verifyLoginTicket verifyLoginTicket(no)->loginFail verifyLoginTicket(yes)->generateTgt->isGenTgtSuccess isGenTgtSuccess(no)->loginFail isGenTgtSuccess(yes)->addTgtCookie->generateServiceTicket isTgtIsExist(yes, right)->isTgtIsValid isTgtIsValid(no, right)->destoryInvalidTgt->generateLoginTicket isTgtIsValid(yes)->generateServiceTicket->retRedirectToApp1ServerLogin->requestAppServer->reqVerifySt->isStValid isStValid(yes)->retStValid->loginSuccess isStValid(no, right)->retStInValid->loginFail

文章目录
,