1.Authenticator:認證器,管理登陸與登出。
2.Authorizer:授權(quán)器,賦予主體權(quán)限。
3.Session Manager:session管理器,session管理機制。不借助任何web容器使用session
4.Session Dao:session操作,主要增刪改查。
5.Cache Manager:緩存管理器
6.Pluggable Realms(1 or more):shiro與數(shù)據(jù)庫的連接
7.Cryptography:數(shù)據(jù)加密
2.Authorizer:授權(quán)器,賦予主體權(quán)限。
3.Session Manager:session管理器,session管理機制。不借助任何web容器使用session
4.Session Dao:session操作,主要增刪改查。
5.Cache Manager:緩存管理器
6.Pluggable Realms(1 or more):shiro與數(shù)據(jù)庫的連接
7.Cryptography:數(shù)據(jù)加密
2018-12-05
最新回答 / Youare_my_sunshine
String password = getPasswordByUsername(username);通過這個去獲取的密碼,如果密碼沒有找到是直接 return null,不為空才創(chuàng)建SimpleAuthenticationInfo返回對象的,這個是在創(chuàng)建對象之前的,這里用的是map一個定值,也可以是數(shù)據(jù)庫或者緩存中去查找密碼。login傳遞的是明文,但是通過//加密 HashedCredentialsMatcher matcher = new HashedCredentialsMatcher(); m...
2018-12-03
最新回答 / 慕工程5036080
CustomRealm:
public?class?CustomRealm?extends?AuthorizingRealm?{ ????Map&StrString,?String&=?n?userMap?=?new?HashMap&??{&???(16); ????{ ????????userMap.put("Mark",?"283538989cef48f3d7d8a1c1bdf2008f"); ????????supe...
2018-12-03
已采納回答 / 一直走下去吧
你登陸了,subject內(nèi)有信息,服務(wù)器為關(guān)閉,肯定有你的信息,你是admin角色所以可以訪問testrole,沒有admin1這個角色所以報錯
2018-11-22
+ 我來回答
回答最高可+2積分
最新回答 / weixin_慕先生7407711
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"???????? xmlns="http://java.sun.com/xml/ns/javaee"????????? xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" ?????...
2018-11-14
最新回答 / lisha2019
重定向次數(shù)過多,login.html前面要加上/,否則就會報這個錯
&hirbean?id="shiroFilter"?class="org.apache.shiro.spring.web.ShiroFilterFactoryBean"?&="s ????&ageproperty?name="securityManager"?ref="securityManager"?/&l"? ???...
2018-11-14