Class SimplePrincipal
- java.lang.Object
-
- org.apereo.cas.authentication.principal.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.PrincipalSimple implementation of aPrincipalthat 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 protectedSimplePrincipal(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> attributes)Instantiates a new simple principal.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.Map<java.lang.String,java.lang.Object>getAttributes()inthashCode()
-
-
-
Method Detail
-
getAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
- Specified by:
getAttributesin interfaceorg.apereo.cas.authentication.principal.Principal- Returns:
- An immutable map of principal attributes
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-