@Override public void setAuthenticator(Authenticator authenticator) throws IllegalArgumentException { super.setAuthenticator(authenticator); if (authenticator instanceof ModularRealmAuthenticator) { ((ModularRealmAuthenticator) authenticator).setRealms(getRealms()); } }
/** * Passes on the {@link #getRealms() realms} to the internal delegate <code>Authenticator</code> instance so * that it may use them during authentication attempts. */ protected void afterRealmsSet() { super.afterRealmsSet(); if (this.authenticator instanceof ModularRealmAuthenticator) { ((ModularRealmAuthenticator) this.authenticator).setRealms(getRealms()); } }
@Override public Authenticator getAuthenticator() { ModularRealmAuthenticator authenticator = new ModularRealmAuthenticator(); authenticator.setAuthenticationStrategy(new NegotiateAuthenticationStrategy()); return authenticator; }
private void initializeAuthenticator(DefaultSecurityManager dsm) { //((AbstractAuthenticator) dsm.getAuthenticator()).setAuthenticationListeners(authenticationListeners); if(dsm.getAuthenticator() instanceof ModularRealmAuthenticator) { ((ModularRealmAuthenticator) dsm.getAuthenticator()).setAuthenticationStrategy(new FirstSuccessfulStrategy()); } }
@Override public Authenticator getAuthenticator() { return new ModularRealmAuthenticator(); }
private void initializeAuthenticator(DefaultSecurityManager dsm) { if(dsm.getAuthenticator() instanceof ModularRealmAuthenticator) { ((ModularRealmAuthenticator) dsm.getAuthenticator()).setAuthenticationStrategy(new FirstSuccessfulStrategy()); } }
/** * Default no-arg constructor that initializes its internal * <code>authenticator</code> instance to a * {@link org.apache.shiro.authc.pam.ModularRealmAuthenticator ModularRealmAuthenticator}. */ public AuthenticatingSecurityManager() { super(); this.authenticator = new ModularRealmAuthenticator(); }