public interface AuthenticationHandler
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
HandlerResult
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.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()