Class StatementUtil
- java.lang.Object
-
- org.keycloak.saml.processing.core.saml.v2.util.StatementUtil
-
public class StatementUtil extends Object
Deals with SAML2 Statements- Since:
- Aug 31, 2009
- Author:
- Anil.Saldhana@redhat.com
-
-
Field Summary
Fields Modifier and Type Field Description static QNameX500_QNAME
-
Constructor Summary
Constructors Constructor Description StatementUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,Object>asMap(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 Detail
-
X500_QNAME
public static final QName X500_QNAME
-
-
Method Detail
-
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
public static AttributeStatementType createAttributeStatement(Map<String,Object> attributes)
Create an attribute statement with all the attributes- Parameters:
attributes- a map with keys fromAttributeConstants- Returns:
-
createAttributeStatement
public static AttributeStatementType createAttributeStatement(List<String> roles)
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
public static AttributeStatementType createAttributeStatement(String key, String value)
Given an attribute type and a value, createAttributeStatementType- Parameters:
key- attribute typevalue- attribute value- Returns:
-
asMap
public static Map<String,Object> asMap(Set<AttributeStatementType> attributeStatementTypes)
-
-