(一) shiro的SecurityManager類結構為: 總結: 1.SecurityManager主要作用於登錄、登出用創建主題Subject,並繼承自Authenticator身份驗證器和許可權驗證器和sessionManager,這些介面不對外開放,shiro本身自己調用,客戶端使用應該使用 ...
(一) shiro的SecurityManager類結構為:
總結:
1.SecurityManager主要作用於登錄、登出用創建主題Subject,並繼承自Authenticator身份驗證器和許可權驗證器和sessionManager,這些介面不對外開放,shiro本身自己調用,客戶端使用應該使用Subject,而不是SecurityManager。
2.CachingSecurityManager主要是註入Cachemager,並清空Cachemager
3.RealmSucurityManager管理realams,並清空Cachemager
4.AuthenticatingSucurityManager組合authenticator身份驗證器,並清空authenticator
5.AuthorizingSecurityManagerr組合authorizer許可權驗證哭器,並清空authorizer
6.SessionsSecurityManager組合sessionManager,實現Session的創建Start和getSession,並清空sessionManager
7.DefaultSecurityManager組合SubjectDAO、SubjectFactory主要是創建createSubject、login、logout.
SecurityManager主要是組合對象,委托組合對象實現底層。