shiro自定义realm认证(五)
上一节介绍了realm的作用:
realm:需要根据token中的身份信息去查询数据库(入门程序使用ini配置文件),如果查到用户返回认证信息,如果查询不到返回null。token就相当于是对用户输入的用户名和密码的一个封装。下面就是创建一个用户名密码token:
UsernamePasswordToken token = new UsernamePasswordToken("zhangsan", "111111");
Realm结构:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeoAAAGpCAIAAADNw+KvAAAgAElEQVR4nO2da3DUVoLvu+pW3U9bNVu3Zj9M1d6tO5lMdrcmd/dmuHWXuHZ3ZgcySyAPSMIjDjMJMHQySZgwYTaBEGKHVzBO4raNbTAGjHk7GIwxDTYY08a8Yl5+YAxtGxoCtrExDxuMwbbuB3VLR9KRWuo+klrd/1O/onBbj6Oj7l8fH0nn75qTex4AAIDjcNleAwAAABEAfQMAgCNx/S51DwAAAKfw+8Xlor45LgAAAMARQN8AAOBIoG8AAHAk0DcAADgS6BsAAByJHfr2f/G8y+V6/gu//FeFbpfL5Ur22rP3qPC6XS4LKh/jbWLvmaVWxpYzYuOuQSIh0XfG8y5KYW26+NO3P+OXocaSVd6X8bwJDRizbRIn+i50yz4BGT6Td+2Q9wmIMWJK35Zgwt75rrfbq/yVL+N5l8tdaMNh2tIm9p5ZamVY6Fvl5DLctUPeJyDGoA6eyPpKvoznXS7XLzP80h+9wc+qN9T3JDop4geA0nMRPuTeZOkysv0qNsKv6C70uvnFfMT3Tah68mUk23G5C1X2rnKMfll7kR/sYD295GddYS6vm/xYUlanVDj44RdelFVD/agp54K2sN420XEqQ8u7eMHpObPaJ0ipPM3ltQ6TdKi8Yr/M8IuVVxyX5H3In1/pgbDftfA+4f+SM9zfBwmJHn1L31Khj5NoGZfs7SvvvMh7LsE39C+J1cmPpfIjLbPDL0OfDdky5KdFZRlRVfK9049R0ljKTlmyN5y+w64e7qBcCn2rHzVlLdrCutskzKmU7lRxgpTb0Xm8UoOHW97t1W4T5U5dLnklqS3MVyNoZ9pezNg19J3QuH70kev1FRR+9BF1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1NK3dk1EuQtjJvKzLDZdpTD2Ld+X/BAEff9/xVkgZntOpEYAAAAASUVORK5CYII=" alt="" />
自定义realm
package cn.qlq.realm; import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.SimpleAuthenticationInfo;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection; /**
* 自定义realm。根据上面穿下来的token去数据库查信息,查到返回一个SimpleAuthenticationInfo,查不到返回null
* @author: qlq
* @date : 2017年7月28日下午8:45:52
*/
public class CustomRealm extends AuthorizingRealm { // 设置realm的名称
@Override
public void setName(String name) {
super.setName("customRealm");
} // 用于认证
@Override
protected AuthenticationInfo doGetAuthenticationInfo(
AuthenticationToken token) throws AuthenticationException { // token是用户输入的
// 第一步从token中取出身份信息(token代表用户输入的传下来的信息)
String userCode = (String) token.getPrincipal(); // 第二步:根据用户输入的userCode从数据库查询
// ....从数据库查数据 // 如果查询不到返回null
//数据库中用户账号是zhangsansan
/*if(!userCode.equals("zhangsansan")){//
return null;
}*/ // 模拟从数据库查询到密码
String password = "111111"; // 如果查询到返回认证信息AuthenticationInfo
SimpleAuthenticationInfo simpleAuthenticationInfo = new SimpleAuthenticationInfo(
userCode, password, this.getName()); return simpleAuthenticationInfo;
} // 用于授权
@Override
protected AuthorizationInfo doGetAuthorizationInfo(
PrincipalCollection principals) {
// TODO Auto-generated method stub
return null;
} }
查看:AuthenticationToken
public interface AuthenticationToken extends Serializable {
Object getPrincipal();//用户输入的用户名 Object getCredentials();//用户输入的密码
}
配置realm
需要在shiro-realm.ini配置realm注入到securityManager中。
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZsAAAB3CAIAAABaC3riAAAZ/0lEQVR4nO2d728cx3nH9+/Rq/5IlGSdkEAJFOqb9g1fm35BLtCWetGAcEUj5Nl1WFOubKzkMKCVIxTIFUm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ihnwZZ0nfN9AeqapAhFmgGeFbX6RqpZEk7bw5KerYp38QWfTF5au8lrVAqzVU6W/BZVL2SKE4oU/Jcy5az4E0n10gzScIqKJGjg+FAP0K3ISY4zNVvejVaQc+jP7d1UYhsCbiwAAAABJRU5ErkJggg==" alt="" />
Java测试:
// 自定义realm测试
@Test
public void testCustomRealm() { // 创建securityManager工厂,通过ini配置文件创建securityManager工厂
Factory<SecurityManager> factory = new IniSecurityManagerFactory(
"classpath:shiro-realm.ini"); // 创建SecurityManager
SecurityManager securityManager = factory.getInstance(); // 将securityManager设置当前的运行环境中
SecurityUtils.setSecurityManager(securityManager); // 从SecurityUtils里边创建一个subject
Subject subject = SecurityUtils.getSubject(); // 在认证提交前准备token(令牌)
// 这里的账号和密码 将来是由用户输入进去
UsernamePasswordToken token = new UsernamePasswordToken("zhangsan",
"111111"); try {
// 执行认证提交
subject.login(token);
} catch (AuthenticationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} // 是否认证通过
boolean isAuthenticated = subject.isAuthenticated(); System.out.println("是否认证通过:" + isAuthenticated); }
shiro自定义realm认证(五)的更多相关文章
- 权限框架 - shiro 自定义realm
上篇文章中是使用的默认realm来实现的简单登录,这仅仅只是个demo,真正项目中使用肯定是需要连接数据库的 首先创建自定义realm文件,如下: 在shiro中注入自定义realm的完全限定类名: ...
- Shiro笔记(四)Shiro的realm认证
认证流程: 1.获取当前Subject.调用SecurityUtils.getSubject(); 2.测试当前用户是否已经被认证,即是否已经登录,调用Subject的isAurhenticated( ...
- shiro自定义realm支持MD5算法认证(六)
1.1 散列算法 通常需要对密码 进行散列,常用的有md5.sha, 对md5密码,如果知道散列后的值可以通过穷举算法,得到md5密码对应的明文. 建议对md5进行散列时加salt(盐),进行 ...
- shiro自定义Realm
1.1 自定义Realm 上边的程序使用的是shiro自带的IniRealm,IniRealm从ini配置文件中读取用户的信息,大部分情况下需要从系统的数据库中读取用户信息,所以需要自定义realm. ...
- (3)shiro自定义realm
上面一章说到shiro的认证和授权最底层就是调用realm的getAuthorizationInfo(获取用户的角色和资源)和getAuthenticationInfo(校验账号密码是否正确)两个方法 ...
- Shiro自定义realm实现密码验证及登录、密码加密注册、修改密码的验证
一:先从登录开始,直接看代码 @RequestMapping(value="dologin",method = {RequestMethod.GET, RequestMethod. ...
- Shiro 自定义角色 认证
转载,原博文的地址在:https://ailongni.iteye.com/blog/2086022 由于Shiro filterChainDefinitions中 roles默认是and,/** = ...
- Shiro自定义Realm时用注解的方式注入父类的credentialsMatcher
用Shiro做登录权限控制时,密码加密是自定义的. 数据库的密码通过散列获取,如下,算法为:md5,盐为一个随机数字,散列迭代次数为3次,最终将salt与散列后的密码保存到数据库内,第二次登录时将登录 ...
- shiro中自定义realm实现md5散列算法加密的模拟
shiro中自定义realm实现md5散列算法加密的模拟.首先:我这里是做了一下shiro 自定义realm散列模拟,并没有真正链接数据库,因为那样东西就更多了,相信学到shiro的人对连接数据库的一 ...
随机推荐
- BZOJ3456 城市规划 【生成函数】【FFT】
题目分析: 容易想到生成函数的构造方法. 令g(n)表示n个点的无向图个数,f(n)表示n个点的无向连通图的个数.式子是显然的. 容易发现式子是卷积的形式,写出生成函数,然后多项式求逆后多项式乘法即可 ...
- jdbc,mybatis,hibernate各自有优缺点以及区别
JDBC: 我们平时使用jdbc进行编程,大致需要下面几个步骤: 1,使用jdbc编程需要连接数据库,注册驱动和数据库信息 2,操作Connection,打开Statement对象 3,通过State ...
- 如何注册CUBA Studio
拿着注册码不会注册,我也是醉了 运行Cuba Studio,然后在浏览器中打开,不要新建项目,这时右上角有一个英文[Register]和一个单选开关.如下: 这个英文不是这个单选开关的说明,它是一个超 ...
- 洛谷 P1053 音乐会的等待 解题报告
P1823 音乐会的等待 题目描述 \(N\)个人正在排队进入一个音乐会.人们等得很无聊,于是他们开始转来转去,想在队伍里寻找自己的熟人.队列中任意两个人\(A\)和\(B\),如果他们是相邻或他们之 ...
- Python中threading的join和setDaemon的区别及用法
Python多线程编程时经常会用到join()和setDaemon()方法,基本用法如下: join([time]): 等待至线程中止.这阻塞调用线程直至线程的join() 方法被调用中止-正常退出或 ...
- Java核心技术-具体的集合
除了Map结尾的类之外,其他都实现了Collection接口,而以Map结尾的类实现了Map接口. 链表 在Java程序设计语言中,所有链表实际上都是双向链表的(double linked)--即每个 ...
- Android 友盟SDK 终极解决报错:SocialSDK_QQZone_2.jar contains native libraries that
转自:http://bbs.umeng.com/thread-6552-1-2.html 报错信息:The library `SocialSDK_QQZone_2.jar` contains nati ...
- poj 2186 "Popular Cows"(强连通分量入门题)
传送门 参考资料: [1]:挑战程序设计竞赛 题意: 每头牛都想成为牛群中的红人. 给定N头牛的牛群和M个有序对(A, B),(A, B)表示牛A认为牛B是红人: 该关系具有传递性,所以如果牛A认为牛 ...
- windows 2003 IIS FTP 530 home directory inaccessible
在 Windows Server 2003 及更新的版本中,IIS 中的 FTP 可以使用用户隔离了. 隔离有什么好处呢? 看起来更高级.比如 ftp1 用户打开的时候看到的路径是 /,但内容是自己文 ...
- 串口、COM口、TTL、RS-232、RS-485区别详解
1.串口.COM口是指的物理接口形式(硬件).而TTL.RS-232.RS-485是指的电平标准(电信号). 2.接设备的时候,一般只接GND RX TX.不会接Vcc或者+3.3v的电源线,避 ...