Shiro認證過程

2021-10-20 07:50:42 字數 744 閱讀 5688

①. 應用程式**呼叫 subject.login 方法,傳遞建立好的包含終端使用者的 principals(身份)和 credentials(憑證)的 authenticationtoken 例項

②. subject 例項: 通常為 delegatingsubject(或子類)委託應用程式的 securitymanager 通過呼叫securitymanager.login(token) 開始真正的驗證。

③. subjectmanager 接收 token,呼叫內部的 authenticator 例項呼叫 authenticator.authenticate(token).authenticator 通常是乙個 modularrealmauthenticator 例項, 支援在身份驗證中協調乙個或多個realm 例項

④. 如果應用程式中配置了乙個以上的 realm, modularrealmauthenticator 例項將利用配置好的authenticationstrategy 來啟動 multi-realm 認證嘗試. 在realms 被身份驗證呼叫之前, 期間和以後,authenticationstrategy 被呼叫使其能夠對每個realm 的結果作出反應.

⑤. 每個配置的 realm 用來幫助看它是否支援提交的 authenticationtoken. 如果支援, 那麼支援 realm 的 getauthenticationinfo 方法將會伴隨著提交的 token 被呼叫. getauthenticationinfo 方法有效地代表乙個特定 realm 的單一的身份驗證嘗試。

Shiro認證過程?

應用程式 呼叫 subject。login 方法,傳遞建立好的包含終端使用者的 principals 身份 和 credentials 憑證 的 authenticationtoken 例項 subject 例項 通常為 delegatingsubject 或子類 委託應用程式的 securitym...

Shiro認證過程?

應用程式 呼叫 subject。login 方法,傳遞建立好的包含終端使用者的 principals 身份 和 credentials 憑證 的 authenticationtoken 例項 subject 例項 通常為 delegatingsubject 或子類 委託應用程式的 securitym...

shiro認證授權過程

nclick formsubmit login.action self public string login throws exception subject.login token 當這一 執行時,就會自動跳入到authrealm中認證方法 protected authenticationinf...