@FunctionalInterface
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 |
---|---|
AuthenticationHandlerExecutionResult |
authenticate(Credential credential)
Authenticates the given credential.
|
default java.lang.String |
getName()
Gets a unique name for this authentication handler within the Spring context that contains it.
|
default int |
getOrder() |
default boolean |
supports(Credential credential)
Determines whether the handler has the capability to authenticate the given credential.
|
static final java.lang.String SUCCESSFUL_AUTHENTICATION_HANDLERS
AuthenticationHandlerExecutionResult authenticate(Credential credential) throws java.security.GeneralSecurityException, PreventedException
AuthenticationHandlerExecutionResult
GeneralSecurityException
PreventedException
credential
- The credential to authenticate.Principal
java.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.FailedLoginException
javax.security.auth.login.CredentialExpiredException
javax.security.auth.login.AccountExpiredException
javax.security.auth.login.AccountLockedException
javax.security.auth.login.AccountNotFoundException
org.apereo.cas.authentication.InvalidLoginTimeException
org.apereo.cas.authentication.InvalidLoginLocationException
java.security.cert.CertificateExpiredException
PreventedException
- On errors that prevented authentication from occurring. Implementing classes SHOULD
take care to populate the cause, where applicable, with the error that prevented authentication.default 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.default java.lang.String getName()
default int getOrder()
getOrder
in interface org.springframework.core.Ordered