Package org.apereo.cas.authentication
Class DefaultAuthentication
java.lang.Object
org.apereo.cas.authentication.DefaultAuthentication
- All Implemented Interfaces:
Serializable,org.apereo.cas.authentication.Authentication
public class DefaultAuthentication
extends Object
implements org.apereo.cas.authentication.Authentication
Immutable authentication event whose attributes may not change after creation.
This class is designed for serialization and is suitable for long-term storage.
- Since:
- 3.0.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultAuthentication(ZonedDateTime authenticationDate, org.apereo.cas.authentication.principal.Principal principal, List<org.apereo.cas.authentication.MessageDescriptor> warnings, List<org.apereo.cas.authentication.Credential> credentials, Map<String, List<Object>> attributes, Map<String, org.apereo.cas.authentication.AuthenticationHandlerExecutionResult> successes, Map<String, Throwable> failures) Creates a newDefaultAuthenticationinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String name, Object value) booleancontainsAttribute(String name) booleanAuthentication metadata attributes.Authentication date stamp.List<org.apereo.cas.authentication.Credential> List of metadata about credentials presented at authentication.Map of handler name to handler authentication failure cause.org.apereo.cas.authentication.principal.PrincipalAuthenticated principal.<T> TgetSingleValuedAttribute(String name, Class<T> expectedType) Map of handler name to handler authentication success event.List<org.apereo.cas.authentication.MessageDescriptor> Authentication messages and warnings.inthashCode()booleanisEqualTo(org.apereo.cas.authentication.Authentication authn) voidreplaceAttributes(org.apereo.cas.authentication.Authentication authentication) toString()voidupdateAttributes(org.apereo.cas.authentication.Authentication authentication) Methods inherited from interface org.apereo.cas.authentication.Authentication
getSingleValuedAttribute
-
Constructor Details
-
DefaultAuthentication
public DefaultAuthentication() -
DefaultAuthentication
public DefaultAuthentication(ZonedDateTime authenticationDate, org.apereo.cas.authentication.principal.Principal principal, List<org.apereo.cas.authentication.MessageDescriptor> warnings, List<org.apereo.cas.authentication.Credential> credentials, Map<String, List<Object>> attributes, Map<String, org.apereo.cas.authentication.AuthenticationHandlerExecutionResult> successes, Map<String, Throwable> failures) Creates a newDefaultAuthenticationinstance.- Parameters:
authenticationDate- Authentication date stamp.principal- Authenticated principal.warnings- Authentication messages and warnings.credentials- List of metadata about credentials presented at authentication.attributes- Authentication metadata attributes.successes- Map of handler name to handler authentication success event.failures- Map of handler name to handler authentication failure cause.
-
-
Method Details
-
addAttribute
- Specified by:
addAttributein interfaceorg.apereo.cas.authentication.Authentication
-
containsAttribute
- Specified by:
containsAttributein interfaceorg.apereo.cas.authentication.Authentication
-
updateAttributes
public void updateAttributes(org.apereo.cas.authentication.Authentication authentication) - Specified by:
updateAttributesin interfaceorg.apereo.cas.authentication.Authentication
-
replaceAttributes
public void replaceAttributes(org.apereo.cas.authentication.Authentication authentication) - Specified by:
replaceAttributesin interfaceorg.apereo.cas.authentication.Authentication
-
isEqualTo
public boolean isEqualTo(org.apereo.cas.authentication.Authentication authn) - Specified by:
isEqualToin interfaceorg.apereo.cas.authentication.Authentication
-
getSingleValuedAttribute
- Specified by:
getSingleValuedAttributein interfaceorg.apereo.cas.authentication.Authentication
-
getAuthenticationDate
Authentication date stamp.- Specified by:
getAuthenticationDatein interfaceorg.apereo.cas.authentication.Authentication
-
getPrincipal
public org.apereo.cas.authentication.principal.Principal getPrincipal()Authenticated principal.- Specified by:
getPrincipalin interfaceorg.apereo.cas.authentication.Authentication
-
getWarnings
Authentication messages and warnings.- Specified by:
getWarningsin interfaceorg.apereo.cas.authentication.Authentication
-
getCredentials
List of metadata about credentials presented at authentication.- Specified by:
getCredentialsin interfaceorg.apereo.cas.authentication.Authentication
-
getAttributes
Authentication metadata attributes.- Specified by:
getAttributesin interfaceorg.apereo.cas.authentication.Authentication
-
getSuccesses
public Map<String,org.apereo.cas.authentication.AuthenticationHandlerExecutionResult> getSuccesses()Map of handler name to handler authentication success event.- Specified by:
getSuccessesin interfaceorg.apereo.cas.authentication.Authentication
-
getFailures
Map of handler name to handler authentication failure cause.- Specified by:
getFailuresin interfaceorg.apereo.cas.authentication.Authentication
-
equals
-
hashCode
public int hashCode() -
toString
-