Java 类org.apache.shiro.authc.pam.FirstSuccessfulStrategy 实例源码

项目:mica2    文件:SecurityManagerFactory.java   
private void initializeAuthenticator(DefaultSecurityManager dsm) {
  //((AbstractAuthenticator) dsm.getAuthenticator()).setAuthenticationListeners(authenticationListeners);

  if(dsm.getAuthenticator() instanceof ModularRealmAuthenticator) {
    ((ModularRealmAuthenticator) dsm.getAuthenticator()).setAuthenticationStrategy(new FirstSuccessfulStrategy());
  }
}
项目:agate    文件:SecurityManagerFactory.java   
private void initializeAuthenticator(DefaultSecurityManager dsm) {
  if(dsm.getAuthenticator() instanceof ModularRealmAuthenticator) {
    ((ModularRealmAuthenticator) dsm.getAuthenticator()).setAuthenticationStrategy(new FirstSuccessfulStrategy());
  }
}
项目:admin-shiro    文件:ShiroConfig.java   
/**
 * Shiro默认提供了三种 AuthenticationStrategy 实现:
 * AtLeastOneSuccessfulStrategy :其中一个通过则成功。
 * FirstSuccessfulStrategy :其中一个通过则成功,但只返回第一个通过的Realm提供的验证信息。
 * AllSuccessfulStrategy :凡是配置到应用中的Realm都必须全部通过。
 * authenticationStrategy
 *
 */
@Bean(name = "authenticationStrategy")
public AuthenticationStrategy authenticationStrategy() {
    return new FirstSuccessfulStrategy();
}