org.keycloak.saml.processing.core.saml.v2.util

## 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 and Description
    --- | ---
    `static QName` | `X500_QNAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StatementUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Map<String,Object>` | `asMap(Set<AttributeStatementType> attributeStatementTypes)`
    `static AttributeStatementType` | `createAttributeStatement(List<String> roles)` Given a set of roles, create an attribute statement
    `static AttributeStatementType` | `createAttributeStatement(Map<String,Object> attributes)` Create an attribute statement with all the attributes
    `static AttributeStatementType` | `createAttributeStatement(String key, String value)` Given an attribute type and a value, create `AttributeStatementType`
    `static AttributeStatementType` | `createAttributeStatementForRoles(List<String> roles, boolean multivalued)` Given a set of roles, create an attribute statement
    `static AuthnStatementType` | `createAuthnStatement(XMLGregorianCalendar instant, String authnContextClassRefValue)` Create an AuthnStatementType given the issue instant and the type of authentication

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### X500_QNAME

          public static final QName X500_QNAME

  - ### Constructor Detail

    - #### StatementUtil

          public StatementUtil()

  - ### 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 instanceof `XMLGregorianCalendar`
        `authnContextClassRefValue` - 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 from `AttributeConstants`
      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, create `AttributeStatementType`
      Parameters:
        `key` - attribute type
        `value` - attribute value
      Returns:

    - #### asMap

          public static Map<String,Object> asMap(Set<AttributeStatementType> attributeStatementTypes)

Copyright © 2020 JBoss by Red Hat. All rights reserved.