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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasMap
(Set<AttributeStatementType> attributeStatementTypes) static AttributeStatementType
createAttributeStatement
(String key, String value) Given an attribute type and a value, createAttributeStatementType
static AttributeStatementType
createAttributeStatement
(List<String> roles) Given a set of roles, create an attribute statementstatic AttributeStatementType
createAttributeStatement
(Map<String, Object> attributes) Create an attribute statement with all the attributesstatic AttributeStatementType
createAttributeStatementForRoles
(List<String> roles, boolean multivalued) Given a set of roles, create an attribute statementstatic AuthnStatementType
createAuthnStatement
(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 instanceofXMLGregorianCalendar
authnContextClassRefValue
- 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
-