Package org.keycloak.adapters.saml
Class SamlPrincipal
java.lang.Object
org.keycloak.adapters.saml.SamlPrincipal
- All Implemented Interfaces:
Serializable,Principal
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSamlPrincipal(AssertionType assertion, String name, String samlSubject, String nameIDFormat, MultivaluedHashMap<String, String> attributes, MultivaluedHashMap<String, String> friendlyAttributes) SamlPrincipal(AssertionType assertion, Document assertionDocument, String name, String samlSubject, String nameIDFormat, MultivaluedHashMap<String, String> attributes, MultivaluedHashMap<String, String> friendlyAttributes) -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet full saml assertiongetAttribute(String name) Convenience function that gets first value of an attribute by attribute nameGet set of all assertion attribute namesConvenience function that gets the attributes associated with this principalgetAttributes(String name) Convenience function that gets Attribute value by attribute namegetFriendlyAttribute(String friendlyName) Convenience function that gets first value of an attribute by attribute namegetFriendlyAttributes(String friendlyName) Convenience function that gets Attribute value by attribute friendly nameGet set of all assertion friendly attribute namesgetName()Subject nameID formatSubject nameID formatGet SAML subject sent in assertioninthashCode()
-
Field Details
-
DEFAULT_ROLE_ATTRIBUTE_NAME
- See Also:
-
-
Constructor Details
-
SamlPrincipal
public SamlPrincipal(AssertionType assertion, String name, String samlSubject, String nameIDFormat, MultivaluedHashMap<String, String> attributes, MultivaluedHashMap<String, String> friendlyAttributes) -
SamlPrincipal
public SamlPrincipal(AssertionType assertion, Document assertionDocument, String name, String samlSubject, String nameIDFormat, MultivaluedHashMap<String, String> attributes, MultivaluedHashMap<String, String> friendlyAttributes) -
SamlPrincipal
public SamlPrincipal()
-
-
Method Details
-
getAssertion
Get full saml assertion- Returns:
-
getSamlSubject
Get SAML subject sent in assertion- Returns:
-
getNameIDFormat
Subject nameID format- Returns:
-
getNameID
Subject nameID format- Returns:
-
getAssertionDocument
-
getName
-
getAttributes
Convenience function that gets Attribute value by attribute name- Parameters:
name-- Returns:
-
getAttributes
Convenience function that gets the attributes associated with this principal- Returns:
- attributes associated with this principal
-
getFriendlyAttributes
Convenience function that gets Attribute value by attribute friendly name- Parameters:
friendlyName-- Returns:
-
getAttribute
Convenience function that gets first value of an attribute by attribute name- Parameters:
name-- Returns:
-
getFriendlyAttribute
Convenience function that gets first value of an attribute by attribute name- Parameters:
friendlyName-- Returns:
-
getAttributeNames
Get set of all assertion attribute names- Returns:
-
getFriendlyNames
Get set of all assertion friendly attribute names- Returns:
-
equals
-
hashCode
public int hashCode()
-