Class DefaultAuthentication

  • All Implemented Interfaces:
    java.io.Serializable, org.apereo.cas.authentication.Authentication

    public class DefaultAuthentication
    extends java.lang.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:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultAuthentication​(@NonNull java.time.ZonedDateTime date, @NonNull java.util.List<org.apereo.cas.authentication.CredentialMetaData> credentials, @NonNull org.apereo.cas.authentication.principal.Principal principal, @NonNull java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes, @NonNull java.util.Map<java.lang.String,​org.apereo.cas.authentication.AuthenticationHandlerExecutionResult> successes, @NonNull java.util.Map<java.lang.String,​java.lang.Throwable> failures, @NonNull java.util.List<org.apereo.cas.authentication.MessageDescriptor> warnings)  
      DefaultAuthentication​(@NonNull java.time.ZonedDateTime date, @NonNull org.apereo.cas.authentication.principal.Principal principal, @NonNull java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes, @NonNull java.util.Map<java.lang.String,​org.apereo.cas.authentication.AuthenticationHandlerExecutionResult> successes, @NonNull java.util.List<org.apereo.cas.authentication.MessageDescriptor> warnings)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAttribute​(java.lang.String name, java.lang.Object value)  
      void update​(org.apereo.cas.authentication.Authentication authn)  
      void updateAll​(org.apereo.cas.authentication.Authentication authn)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apereo.cas.authentication.Authentication

        getAttributes, getAuthenticationDate, getCredentials, getFailures, getPrincipal, getSuccesses, getWarnings
    • Constructor Detail

      • DefaultAuthentication

        public DefaultAuthentication​(@NonNull
                                     @NonNull java.time.ZonedDateTime date,
                                     @NonNull
                                     @NonNull org.apereo.cas.authentication.principal.Principal principal,
                                     @NonNull
                                     @NonNull java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes,
                                     @NonNull
                                     @NonNull java.util.Map<java.lang.String,​org.apereo.cas.authentication.AuthenticationHandlerExecutionResult> successes,
                                     @NonNull
                                     @NonNull java.util.List<org.apereo.cas.authentication.MessageDescriptor> warnings)
      • DefaultAuthentication

        public DefaultAuthentication​(@NonNull
                                     @NonNull java.time.ZonedDateTime date,
                                     @NonNull
                                     @NonNull java.util.List<org.apereo.cas.authentication.CredentialMetaData> credentials,
                                     @NonNull
                                     @NonNull org.apereo.cas.authentication.principal.Principal principal,
                                     @NonNull
                                     @NonNull java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes,
                                     @NonNull
                                     @NonNull java.util.Map<java.lang.String,​org.apereo.cas.authentication.AuthenticationHandlerExecutionResult> successes,
                                     @NonNull
                                     @NonNull java.util.Map<java.lang.String,​java.lang.Throwable> failures,
                                     @NonNull
                                     @NonNull java.util.List<org.apereo.cas.authentication.MessageDescriptor> warnings)
    • Method Detail

      • update

        public void update​(org.apereo.cas.authentication.Authentication authn)
        Specified by:
        update in interface org.apereo.cas.authentication.Authentication
      • updateAll

        public void updateAll​(org.apereo.cas.authentication.Authentication authn)
        Specified by:
        updateAll in interface org.apereo.cas.authentication.Authentication
      • addAttribute

        public void addAttribute​(java.lang.String name,
                                 java.lang.Object value)
        Specified by:
        addAttribute in interface org.apereo.cas.authentication.Authentication