org.apache.deltaspike.security.impl.authentication
Class DefaultAuthenticatorSelector

java.lang.Object
  extended by org.apache.deltaspike.security.impl.authentication.DefaultAuthenticatorSelector
All Implemented Interfaces:
AuthenticatorSelector

@RequestScoped
public class DefaultAuthenticatorSelector
extends Object
implements AuthenticatorSelector

Default implementation of AuthenticatorSelector


Constructor Summary
DefaultAuthenticatorSelector()
           
 
Method Summary
 Class<? extends Authenticator> getAuthenticatorClass()
           
 String getAuthenticatorName()
           
 Authenticator getSelectedAuthenticator()
          Returns an Authenticator instance to be used for authentication.
 void setAuthenticatorClass(Class<? extends Authenticator> authenticatorClass)
           
 void setAuthenticatorName(String authenticatorName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAuthenticatorSelector

public DefaultAuthenticatorSelector()
Method Detail

getSelectedAuthenticator

public Authenticator getSelectedAuthenticator()
Returns an Authenticator instance to be used for authentication. The default implementation obeys the following business logic:

1. If the user has specified an authenticatorClass property, use it to locate the Authenticator with that exact type 2. If the user has specified an authenticatorName property, use it to locate and return the Authenticator with that name 3. If the authenticatorClass and authenticatorName haven't been specified, and the user has provided their own custom Authenticator, return that one 4. If the user hasn't provided a custom Authenticator, return IdmAuthenticator and attempt to use the Identity Management API to authenticate

Specified by:
getSelectedAuthenticator in interface AuthenticatorSelector
Returns:

getAuthenticatorClass

public Class<? extends Authenticator> getAuthenticatorClass()
Specified by:
getAuthenticatorClass in interface AuthenticatorSelector

setAuthenticatorClass

public void setAuthenticatorClass(Class<? extends Authenticator> authenticatorClass)
Specified by:
setAuthenticatorClass in interface AuthenticatorSelector

getAuthenticatorName

public String getAuthenticatorName()
Specified by:
getAuthenticatorName in interface AuthenticatorSelector

setAuthenticatorName

public void setAuthenticatorName(String authenticatorName)
Specified by:
setAuthenticatorName in interface AuthenticatorSelector


Copyright © 2011-2012 The Apache Software Foundation. All Rights Reserved.