Package org.pac4j.core.profile
Class Pac4JPrincipal
- java.lang.Object
-
- org.pac4j.core.profile.Pac4JPrincipal
-
- All Implemented Interfaces:
java.security.Principal
public class Pac4JPrincipal extends java.lang.Object implements java.security.Principal
Default implementation forPrincipal
based on a pac4jBasicUserProfile
. It determines the name based on the profile's username, and fallbacks to id if it doesn't exist.- Since:
- 3.0.0
- Author:
- Victor Noel
-
-
Constructor Summary
Constructors Constructor Description Pac4JPrincipal(UserProfile profile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getName()
int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
Pac4JPrincipal
public Pac4JPrincipal(UserProfile profile)
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfacejava.security.Principal
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.security.Principal
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interfacejava.security.Principal
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfacejava.security.Principal
- Overrides:
toString
in classjava.lang.Object
-
-