shiro认证过程Authenticator到realm,然后进行认证的过程
2016-11-04 12:58
316 查看
public final AuthenticationInfo getAuthenticationInfo(AuthenticationToken token) throws AuthenticationException { AuthenticationInfo info = getCachedAuthenticationInfo(token); if (info == null) { //otherwise not cached, perform the lookup: info = doGetAuthenticationInfo(token);//调用自定义realm认证方法 log.debug("Looked up AuthenticationInfo [{}] from doGetAuthenticationInfo", info); if (token != null && info != null) { cacheAuthenticationInfoIfPossible(token, info); } } else { log.debug("Using cached authentication info [{}] to perform credentials matching.", info); } if (info != null) { assertCredentialsMatch(token, info);//对token和info进行信息对比 } else { log.debug("No AuthenticationInfo found for submitted AuthenticationToken [{}]. Returning null.", token); } return info; }
AuthenticatingRealm抽象类中定义了这段代码显示了Authenticator调用自定义的realm,和realm返回AuthenticationInfo后,Authenticator再将用户提交的token信息和realm查询到的info信息进行对比,如果相同则认证成功。
相关文章推荐
- java鬼混笔记:shiro 2、自定义realm进行认证
- Shiro入门6:自定义realm查询数据库进行认证
- 使用Apache Shiro进行身份认证-proxool配置
- 使用Apache Shiro进行身份认证-LDAP两次绑定认证
- shiro身份认证过程
- Shiro Review——自定义Realm实现认证
- Shiro Review——自定义Realm实现认证
- 忆龙2009:Windows xp sp3采用EAP-TLS协议进行认证,启动过程认证失败
- shiro的两种认证过程
- shiro认证的过程
- Shiro身份认证、Realm&JDBC Reaml
- shiro authorizingrealm实现认证授权
- 使用Apache Shiro进行身份认证-Active Directory认证
- 将 Shiro 作为应用的权限基础 二:基于SpringMVC实现的认证过程
- 将 Shiro 作为应用的权限基础 三:基于注解实现的授权认证过程
- 三款工作流引擎比较:WWF、netBPM 和 ccflow 下面将对目前比较主流的三款工作流进行介绍和比较,然后通过三款流程引擎分别设计一个较典型的流程来给大家分别演示这三款创建流程的过程.这
- 使用Apache Shiro进行身份认证-LDAP认证
- Apache Shiro 认证过程
- Apache shiro(3)-认证过程
- Shiro入门10:自定义Realm进行授权