首页 > 代码库 > shiro验证时,当authenticationStrategy为AllSuccessfulStrategy时

shiro验证时,当authenticationStrategy为AllSuccessfulStrategy时

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

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

[main]#指定securityManager的authenticator实现authenticator=org.apache.shiro.authc.pam.ModularRealmAuthenticatorsecurityManager.authenticator=$authenticator#指定securityManager.authenticator的authenticationStrategyallSuccessfulStrategy=org.apache.shiro.authc.pam.AllSuccessfulStrategysecurityManager.authenticator.authenticationStrategy=$allSuccessfulStrategymyRealm1=com.github.zhangkaitao.shiro.chapter2.realm.MyRealm1myRealm2=com.github.zhangkaitao.shiro.chapter2.realm.MyRealm2myRealm3=com.github.zhangkaitao.shiro.chapter2.realm.MyRealm3securityManager.realms=$myRealm1,$myRealm3

shiro验证时,当authenticationStrategy为AllSuccessfulStrategy时