org.jasig.cas.authentication
Class AuthenticationManagerImpl
java.lang.Object
org.jasig.cas.authentication.AbstractAuthenticationManager
org.jasig.cas.authentication.AuthenticationManagerImpl
- All Implemented Interfaces:
- AuthenticationManager
public final class AuthenticationManagerImpl
- extends AbstractAuthenticationManager
Default implementation of the AuthenticationManager. The
AuthenticationManager follows the following algorithm. The manager loops
through the array of AuthenticationHandlers searching for one that can
attempt to determine the validity of the credentials. If it finds one, it
tries that one. If that handler returns true, it continues on. If it returns
false, it looks for another handler. If it throws an exception, it aborts the
whole process and rethrows the exception. Next, it looks for a
CredentialsToPrincipalResolver that can handle the credentials in order to
create a Principal. Finally, it attempts to populate the Authentication
object's attributes map using AuthenticationAttributesPopulators
Behavior is determined by external beans attached through three configuration
properties. The Credentials are opaque to the manager. They are passed to the
external beans to see if any can process the actual type represented by the
Credentials marker.
AuthenticationManagerImpl requires the following properties to be set:
-
authenticationHandlers - The array of
AuthenticationHandlers that know how to process the credentials provided.
-
credentialsToPrincipalResolvers - The array of
CredentialsToPrincipal resolvers that know how to process the credentials
provided.
- Since:
- 3.0
- Version:
- $Revision: 47522 $ $Date: 2009-12-14 23:33:36 -0500 (Mon, 14 Dec 2009) $
- Author:
- Scott Battaglia
- See Also:
AuthenticationHandler,
CredentialsToPrincipalResolver,
AuthenticationMetaDataPopulator
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AuthenticationManagerImpl
public AuthenticationManagerImpl()
authenticateAndObtainPrincipal
protected AbstractAuthenticationManager.Pair<AuthenticationHandler,Principal> authenticateAndObtainPrincipal(Credentials credentials)
throws AuthenticationException
- Description copied from class:
AbstractAuthenticationManager
- Follows the same rules as the "authenticate" method (i.e. should only return a fully populated object, or throw an exception)
- Specified by:
authenticateAndObtainPrincipal in class AbstractAuthenticationManager
- Parameters:
credentials - the credentials to check
- Returns:
- the pair of authentication handler and principal. CANNOT be NULL.
- Throws:
AuthenticationException - if there is an error authenticating.
setAuthenticationHandlers
public void setAuthenticationHandlers(java.util.List<AuthenticationHandler> authenticationHandlers)
- Parameters:
authenticationHandlers - The authenticationHandlers to set.
setCredentialsToPrincipalResolvers
public void setCredentialsToPrincipalResolvers(java.util.List<CredentialsToPrincipalResolver> credentialsToPrincipalResolvers)
- Parameters:
credentialsToPrincipalResolvers - The
credentialsToPrincipalResolvers to set.
Copyright © 2004-2010 Java Architectures Special Interest Group. All Rights Reserved.