public abstract class AbstractUsernamePasswordAuthenticationHandler extends AbstractPreAndPostProcessingAuthenticationHandler
This is a published and supported CAS Server 3 API.
log| Constructor and Description |
|---|
AbstractUsernamePasswordAuthenticationHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
authenticateUsernamePasswordInternal(UsernamePasswordCredentials credentials)
Abstract convenience method that assumes the credentials passed in are a
subclass of UsernamePasswordCredentials.
|
protected boolean |
doAuthentication(Credentials credentials)
Method automatically handles conversion to UsernamePasswordCredentials
and delegates to abstract authenticateUsernamePasswordInternal so
subclasses do not need to cast.
|
protected PasswordEncoder |
getPasswordEncoder()
Method to return the PasswordEncoder to be used to encode passwords.
|
protected PrincipalNameTransformer |
getPrincipalNameTransformer() |
void |
setClassToSupport(Class<?> classToSupport)
Method to set the class to support.
|
void |
setPasswordEncoder(PasswordEncoder passwordEncoder)
Sets the PasswordEncoder to be used with this class.
|
void |
setPrincipalNameTransformer(PrincipalNameTransformer principalNameTransformer) |
void |
setSupportSubClasses(boolean supportSubClasses)
Method to set whether this handler will support subclasses of the
supported class.
|
boolean |
supports(Credentials credentials)
Method to check if the handler knows how to handle the credentials
provided.
|
authenticate, getName, postAuthenticate, preAuthenticate, setNamepublic AbstractUsernamePasswordAuthenticationHandler()
protected final boolean doAuthentication(Credentials credentials) throws AuthenticationException
doAuthentication in class AbstractPreAndPostProcessingAuthenticationHandlerAuthenticationExceptionprotected abstract boolean authenticateUsernamePasswordInternal(UsernamePasswordCredentials credentials) throws AuthenticationException
credentials - the credentials representing the Username and Password
presented to CASAuthenticationException - if authenticity cannot be determined.protected final PasswordEncoder getPasswordEncoder()
protected final PrincipalNameTransformer getPrincipalNameTransformer()
public final void setClassToSupport(Class<?> classToSupport)
classToSupport - the class we want this handler to support
explicitly.public final void setSupportSubClasses(boolean supportSubClasses)
supportSubClasses - boolean of whether to support subclasses or not.public final void setPasswordEncoder(PasswordEncoder passwordEncoder)
passwordEncoder - the PasswordEncoder to use when encoding
passwords.public final void setPrincipalNameTransformer(PrincipalNameTransformer principalNameTransformer)
public final boolean supports(Credentials credentials)
AuthenticationHandlercredentials - The credentials to check.Copyright © 2004-2012 Jasig. All Rights Reserved.