Class SimplePrincipal

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

    public class SimplePrincipal
    extends java.lang.Object
    implements org.apereo.cas.authentication.principal.Principal
    Simple implementation of a Principal that exposes an unmodifiable map of attributes. The attributes are cached upon construction and will not be updated unless the principal is entirely and newly resolved again.
    Since:
    3.1
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SimplePrincipal​(@NonNull java.lang.String id, java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes)
      Instantiates a new simple principal.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apereo.cas.authentication.principal.Principal

        getAttributes, getId
    • Constructor Detail

      • SimplePrincipal

        protected SimplePrincipal​(@NonNull
                                  @NonNull java.lang.String id,
                                  java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes)
        Instantiates a new simple principal.
        Parameters:
        id - the id
        attributes - the attributes
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object