public class Pac4jPrincipal extends Object implements Principal, Serializable
| Constructor and Description |
|---|
Pac4jPrincipal(List<org.pac4j.core.profile.CommonProfile> profiles)
Construct a Pac4jPrincipal.
|
Pac4jPrincipal(List<org.pac4j.core.profile.CommonProfile> profiles,
String principalNameAttribute)
Construct a Pac4jPrincipal and specify which attribute in the CommonProfile
should be used for the principal name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getName()
Returns a name for the principal based upon one of the attributes
of the main CommonProfile.
|
org.pac4j.core.profile.CommonProfile |
getProfile()
Get the main profile of the authenticated user.
|
List<org.pac4j.core.profile.CommonProfile> |
getProfiles()
Get all the profiles of the authenticated user.
|
int |
hashCode() |
String |
toString() |
public Pac4jPrincipal(List<org.pac4j.core.profile.CommonProfile> profiles)
profiles - A list containing all of the CommonProfiles created by Pac4j
authorization.public Pac4jPrincipal(List<org.pac4j.core.profile.CommonProfile> profiles, String principalNameAttribute)
profiles - A list containing all of the CommonProfiles created by Pac4j
authorization.principalNameAttribute - The attribute name in the CommonProfile that
holds the principal name. A null or blank value means
that CommonProfile.getId() should be used as the principal name.public org.pac4j.core.profile.CommonProfile getProfile()
public List<org.pac4j.core.profile.CommonProfile> getProfiles()
public boolean equals(Object o)
public int hashCode()
public String getName()
Copyright © 2018. All rights reserved.