首页 > 其他 > 详细

shiro验证时,当authenticationStrategy为AllSuccessfulStrategy时

时间:2014-12-05 10:34:13      阅读:470      评论:0      收藏:0      [点我收藏+]

shiro验证时,当authenticationStrategy为AllSuccessfulStrategy时,如果某一个验证出错,那么

  PrincipalCollection principalCollection = subject.getPrincipals();获得principalCollection为空值。

[main]
#指定securityManager的authenticator实现
authenticator=org.apache.shiro.authc.pam.ModularRealmAuthenticator
securityManager.authenticator=$authenticator

#指定securityManager.authenticator的authenticationStrategy
allSuccessfulStrategy=org.apache.shiro.authc.pam.AllSuccessfulStrategy
securityManager.authenticator.authenticationStrategy=$allSuccessfulStrategy

myRealm1=com.github.zhangkaitao.shiro.chapter2.realm.MyRealm1
myRealm2=com.github.zhangkaitao.shiro.chapter2.realm.MyRealm2
myRealm3=com.github.zhangkaitao.shiro.chapter2.realm.MyRealm3
securityManager.realms=$myRealm1,$myRealm3

bubuko.com,布布扣

shiro验证时,当authenticationStrategy为AllSuccessfulStrategy时

原文:http://www.cnblogs.com/oymx/p/4145858.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!