public interface Authentication
extends java.io.Serializable
The Authentication object represents a successful authentication request. It contains the principal that the authentication request was made for as well as the additional meta information such as the authenticated date and a map of attributes.
An Authentication object must be serializable to permit persistence and clustering.
Implementing classes must take care to ensure that the Map returned by getAttributes is serializable by using a Serializable map such as HashMap.
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Attributes of the authentication (not the Principal).
|
java.time.ZonedDateTime |
getAuthenticationDate()
Method to retrieve the timestamp of when this Authentication object was
created.
|
java.util.List<CredentialMetaData> |
getCredentials()
Gets a list of metadata about the credentials supplied at authentication time.
|
java.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Exception>> |
getFailures()
Gets a map describing failed authentications.
|
Principal |
getPrincipal()
Method to obtain the Principal.
|
java.util.Map<java.lang.String,HandlerResult> |
getSuccesses()
Gets a map describing successful authentications produced by
AuthenticationHandler components. |
void |
update(Authentication authn)
Updates the authentication object with what's passed.
|
void |
updateAll(Authentication authn)
Updates the authentication object with what's passed.
|
Principal getPrincipal()
java.time.ZonedDateTime getAuthenticationDate()
java.util.Map<java.lang.String,java.lang.Object> getAttributes()
java.util.List<CredentialMetaData> getCredentials()
java.util.Map<java.lang.String,HandlerResult> getSuccesses()
AuthenticationHandler
components.java.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Exception>> getFailures()
void update(Authentication authn)
authn
- the authn objectvoid updateAll(Authentication authn)
authn
- the authn object