shiro认证流程初(ini方式)
来源:互联网 发布:原生js处理ajax超时 编辑:程序博客网 时间:2024/06/03 23:40
一:认证流程
二:入门程序
我是用maven管理jar包
2.1:创建shiro.ini配置文件介入如下测试内容
2.2:写入门程序
三:执行认证的流程
1、 创建token令牌,token中有用户提交的认证信息即账号和密码
2、 执行subject.login(token),最终由securityManager通过Authenticator进行认证
3、 Authenticator的实现ModularRealmAuthenticator调用realm从ini配置文件取用户真实的账号和密码,这里使用的是IniRealm(shiro自带)
4、 IniRealm先根据token中的账号去ini中找该账号,如果找不到则给ModularRealmAuthenticator返回null,如果找到则匹配密码,匹配密码成功则认证通过。
四:认证过程中常见的异常
UnknownAccountException
账号不存在异常如下:
org.apache.shiro.authc.UnknownAccountException: No account found for user。。。。
IncorrectCredentialsException
当输入密码错误会抛此异常,如下:
org.apache.shiro.authc.IncorrectCredentialsException: Submitted credentials for token [org.apache.shiro.authc.UsernamePasswordToken - zhangsan, rememberMe=false] did not match the expected credentials.
更多如下:
DisabledAccountException(帐号被禁用)
LockedAccountException(帐号被锁定)
ExcessiveAttemptsException(登录失败次数过多)
ExpiredCredentialsException(凭证过期)等
- shiro认证流程初(ini方式)
- shiro认证的流程
- shiro认证授权流程
- 安全认证框架Shiro (一)- ini配置文件
- shiro 配置-ini配置方式
- Shiro身份认证的流程
- apache shiro 登录认证流程
- Shiro源码分析----认证流程
- Shiro源码分析----认证流程
- 【shiro】授权和认证流程
- shiro的认证思路分析(即登录,流程)
- Shiro认证流程和授权流程
- 身份认证(shiro)
- (二)shiro认证
- shiro 认证(一)
- shiro 认证(二)
- 源码分析shiro认证授权流程
- 源码分析shiro认证授权流程
- Linux基础(虚拟机搭建&常用命令&mysql安装以及Jdk安装)
- 总结2
- Installation failed with message Failed to establish session
- POJ 1659 Frogs' Neighborhood (Havel-Hakimi定理 + 贪心)
- PHP模板引擎twig介绍
- shiro认证流程初(ini方式)
- 【剑指offer】面试题37:两个链表的第一个公共结点
- python之numpy库[1]
- android 建造者设计模式
- 正则表达式
- 13. Roman to Integer
- Could not obtain transaction-synchronized Session for current thread
- malloc()与free()学习笔记
- javascript高级程序设计中的浏览器检测、浏览器引擎检测,平台检测完整代码