Java 类org.apache.shiro.authc.Authenticator 实例源码

项目:nexus-public    文件:WebSecurityModule.java   
@Override
protected void configureShiroWeb() {
  bindRealm().to(EmptyRealm.class); // not used in practice, just here to keep Shiro module happy

  bindSingleton(SessionFactory.class, NexusSessionFactory.class);
  bindSingleton(SessionStorageEvaluator.class, NexusSessionStorageEvaluator.class);
  bindSingleton(SubjectDAO.class, NexusSubjectDAO.class);

  // configure our preferred security components
  bindSingleton(SessionDAO.class, NexusSessionDAO.class);
  bindSingleton(Authenticator.class, FirstSuccessfulModularRealmAuthenticator.class);
  bindSingleton(Authorizer.class, ExceptionCatchingModularRealmAuthorizer.class);
  bindSingleton(FilterChainManager.class, DynamicFilterChainManager.class);

  // path matching resolver has several constructors so we need to point Guice to the appropriate one
  bind(FilterChainResolver.class).toConstructor(ctor(PathMatchingFilterChainResolver.class)).asEagerSingleton();

  // bindings used by external modules
  expose(FilterChainResolver.class);
  expose(FilterChainManager.class);
}
项目:dms-webapp    文件:WebSecurityManagerExt.java   
@Override
public void setAuthenticator(Authenticator authenticator) throws IllegalArgumentException {
    super.setAuthenticator(authenticator);
    if (authenticator instanceof ModularRealmAuthenticator) {
           ((ModularRealmAuthenticator) authenticator).setRealms(getRealms());
       }
}
项目:WebAPI    文件:AtlasSecurity.java   
@Override
public Authenticator getAuthenticator() {
  ModularRealmAuthenticator authenticator = new ModularRealmAuthenticator();
  authenticator.setAuthenticationStrategy(new NegotiateAuthenticationStrategy());

  return authenticator;
}
项目:ameba-shiro    文件:ShiroBinder.java   
@Override
protected void configure() {
    bindFactory(SubjectFactory.class)
            .to(Subject.class)
            .in(RequestScoped.class);
    bind(securityManager)
            .to(SecurityManager.class)
            .to(Authenticator.class)
            .to(Authorizer.class)
            .to(SessionManager.class)
            .proxy(false);
}
项目:WebAPI    文件:DisabledSecurity.java   
@Override
public Authenticator getAuthenticator() {
  return new ModularRealmAuthenticator();
}
项目:rabbitframework    文件:AuthenticatingSecurityManager.java   
/**
 * Sets the delegate <code>Authenticator</code> instance that this SecurityManager uses to perform all
 * authentication operations.  Unless overridden by this method, the default instance is a
 * {@link org.apache.shiro.authc.pam.ModularRealmAuthenticator ModularRealmAuthenticator}.
 *
 * @param authenticator the delegate <code>Authenticator</code> instance that this SecurityManager will use to
 *                      perform all authentication operations.
 * @throws IllegalArgumentException if the argument is <code>null</code>.
 */
public void setAuthenticator(Authenticator authenticator) throws IllegalArgumentException {
    if (authenticator == null) {
        String msg = "Authenticator argument cannot be null.";
        throw new IllegalArgumentException(msg);
    }
    this.authenticator = authenticator;
}
项目:rabbitframework    文件:AuthenticatingSecurityManager.java   
/**
 * Returns the delegate <code>Authenticator</code> instance that this SecurityManager uses to perform all
 * authentication operations.  Unless overridden by the
 * {@link #setAuthenticator(org.apache.shiro.authc.Authenticator) setAuthenticator}, the default instance is a
 * {@link org.apache.shiro.authc.pam.ModularRealmAuthenticator ModularRealmAuthenticator}.
 *
 * @return the delegate <code>Authenticator</code> instance that this SecurityManager uses to perform all
 *         authentication operations.
 */
public Authenticator getAuthenticator() {
    return authenticator;
}
项目:WebAPI    文件:Security.java   
public abstract Authenticator getAuthenticator();