public interface AuthenticationHandler
extends org.springframework.core.Ordered
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SUCCESSFUL_AUTHENTICATION_HANDLERS
Attribute name containing collection of handler names that successfully authenticated credential.
|
| Modifier and Type | Method and Description |
|---|---|
HandlerResult |
authenticate(Credential credential)
Authenticates the given credential.
|
java.lang.String |
getName()
Gets a unique name for this authentication handler within the Spring context that contains it.
|
boolean |
supports(Credential credential)
Determines whether the handler has the capability to authenticate the given credential.
|
static final java.lang.String SUCCESSFUL_AUTHENTICATION_HANDLERS
HandlerResult authenticate(Credential credential) throws java.security.GeneralSecurityException, PreventedException
HandlerResultGeneralSecurityExceptionPreventedExceptioncredential - The credential to authenticate.Principaljava.security.GeneralSecurityException - 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:
javax.security.auth.login.FailedLoginExceptionjavax.security.auth.login.CredentialExpiredExceptionjavax.security.auth.login.AccountExpiredExceptionjavax.security.auth.login.AccountLockedExceptionjavax.security.auth.login.AccountNotFoundExceptionorg.apereo.cas.authentication.InvalidLoginTimeExceptionorg.apereo.cas.authentication.InvalidLoginLocationExceptionjava.security.cert.CertificateExpiredExceptionPreventedException - On errors that prevented authentication from occurring. Implementing classes SHOULD
take care to populate the cause, where applicable, with the error that prevented authentication.boolean supports(Credential credential)
authenticate(Credential) method MUST be capable of processing a given credential if
supports returns true on the same credential.credential - The credential to check.java.lang.String getName()