Class StatementUtil
java.lang.Object
org.keycloak.saml.processing.core.saml.v2.util.StatementUtil
Deals with SAML2 Statements
- Since:
- Aug 31, 2009
- Author:
- Anil.Saldhana@redhat.com
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasMap(Set<AttributeStatementType> attributeStatementTypes) static AttributeStatementTypecreateAttributeStatement(String key, String value) Given an attribute type and a value, createAttributeStatementTypestatic AttributeStatementTypecreateAttributeStatement(List<String> roles) Given a set of roles, create an attribute statementstatic AttributeStatementTypecreateAttributeStatement(Map<String, Object> attributes) Create an attribute statement with all the attributesstatic AttributeStatementTypecreateAttributeStatementForRoles(List<String> roles, boolean multivalued) Given a set of roles, create an attribute statementstatic AuthnStatementTypecreateAuthnStatement(XMLGregorianCalendar instant, String authnContextClassRefValue) Create an AuthnStatementType given the issue instant and the type of authentication
-
Field Details
-
X500_QNAME
-
-
Constructor Details
-
StatementUtil
public StatementUtil()
-
-
Method Details
-
createAuthnStatement
public static AuthnStatementType createAuthnStatement(XMLGregorianCalendar instant, String authnContextClassRefValue) Create an AuthnStatementType given the issue instant and the type of authentication- Parameters:
instant- an instanceofXMLGregorianCalendarauthnContextClassRefValue- indicate the type of authentication performed- Returns:
AuthnStatementType
-
createAttributeStatement
Create an attribute statement with all the attributes- Parameters:
attributes- a map with keys fromAttributeConstants- Returns:
-
createAttributeStatement
Given a set of roles, create an attribute statement- Parameters:
roles-- Returns:
-
createAttributeStatementForRoles
public static AttributeStatementType createAttributeStatementForRoles(List<String> roles, boolean multivalued) Given a set of roles, create an attribute statement- Parameters:
roles-multivalued- if you want the attribute to be multi valued- Returns:
-
createAttributeStatement
Given an attribute type and a value, createAttributeStatementType- Parameters:
key- attribute typevalue- attribute value- Returns:
-
asMap
-