public abstract class AbstractPreAndPostProcessingAuthenticationHandler extends AbstractAuthenticationHandler
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger
Instance of logging for subclasses.
|
| Constructor and Description |
|---|
AbstractPreAndPostProcessingAuthenticationHandler() |
| Modifier and Type | Method and Description |
|---|---|
HandlerResult |
authenticate(Credential credential)
Authenticates the given credential.
|
protected abstract HandlerResult |
doAuthentication(Credential credential)
Performs the details of authentication and returns an authentication handler result on success.
|
protected HandlerResult |
postAuthenticate(Credential credential,
HandlerResult result)
Template method to perform arbitrary post-authentication actions.
|
protected boolean |
preAuthenticate(Credential credential)
Template method to perform arbitrary pre-authentication actions.
|
getName, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsupportspublic AbstractPreAndPostProcessingAuthenticationHandler()
protected boolean preAuthenticate(Credential credential)
credential - the Credential suppliedprotected HandlerResult postAuthenticate(Credential credential, HandlerResult result)
credential - the supplied credentialresult - the result of the authentication attempt.public final HandlerResult authenticate(Credential credential) throws GeneralSecurityException, PreventedException
HandlerResultGeneralSecurityExceptionPreventedExceptioncredential - The credential to authenticate.PrincipalGeneralSecurityException - On authentication failures where the root cause is security related,
e.g. invalid credential. Implementing classes SHOULD be as specific as possible in communicating the reason for
authentication failure. Recommendations for common cases:
FailedLoginExceptionCredentialExpiredExceptionAccountExpiredExceptionAccountLockedExceptionAccountNotFoundExceptionInvalidLoginTimeExceptionInvalidLoginLocationExceptionCertificateExpiredExceptionPreventedException - On errors that prevented authentication from occurring. Implementing classes SHOULD
take care to populate the cause, where applicable, with the error that prevented authentication.protected abstract HandlerResult doAuthentication(Credential credential) throws GeneralSecurityException, PreventedException
credential - Credential to authenticate.GeneralSecurityException - On authentication failure that is thrown out to the caller of
authenticate(org.jasig.cas.authentication.Credential).PreventedException - On the indeterminate case when authentication is prevented.Copyright © 2004-2015 Apereo. All Rights Reserved.