org.keycloak.saml.processing.core.saml.v2.factories

## Class SAMLAssertionFactory

- java.lang.Object
- - org.keycloak.saml.processing.core.saml.v2.factories.SAMLAssertionFactory

-     public class SAMLAssertionFactory
      extends Object

  Deal with `AssertionType`
  Since:
    Jan 28, 2009
  Author:
    Anil.Saldhana@redhat.com

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SAMLAssertionFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static AssertionType` | `createAssertion(String id, NameIDType issuerID, XMLGregorianCalendar issueInstant, ConditionsType conditions, SubjectType subject, List<StatementAbstractType> statements)` Creates a SAMLV2 `AssertionType` with the specified values.
    `static AudienceRestrictionType` | `createAudienceRestriction(String... values)` Creates an `AudienceRestrictionType` with the specified values.
    `static ConditionsType` | `createConditions(XMLGregorianCalendar notBefore, XMLGregorianCalendar notOnOrAfter, ConditionAbstractType... restrictions)` Creates a `Conditions` instance with the specified values.
    `static KeyInfoConfirmationDataType` | `createKeyInfoConfirmation(KeyInfoType keyInfo)` Creates a `KeyInfoConfirmationDataType` with the specified `KeyInfoType`.
    `static NameIDType` | `createNameID(String format, String qualifier, String value)` Creates a `NameIDType` instance with the specified values.
    `static SubjectType` | `createSubject(NameIDType nameID, SubjectConfirmationType confirmation)` Creates a `SubjectType` object with the specified values.
    `static SubjectConfirmationType` | `createSubjectConfirmation(NameIDType nameID, String confirmationMethod, KeyInfoConfirmationDataType keyInfoData)` Creates a `SubjectConfirmationType` object with the specified values.

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

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

- - ### Constructor Detail

    - #### SAMLAssertionFactory

          public SAMLAssertionFactory()

  - ### Method Detail

    - #### createAudienceRestriction

          public static AudienceRestrictionType createAudienceRestriction(String... values)

      Creates an `AudienceRestrictionType` with the specified values.

      Parameters:
        `values` - a `String[]` containing the restriction values.
      Returns:
        the constructed `AudienceRestrictionType` instance.

    - #### createNameID

          public static NameIDType createNameID(String format,
                                                String qualifier,
                                                String value)

      Creates a `NameIDType` instance with the specified values.

      Parameters:
        `format` - a `String` representing the name format.
        `qualifier` - a `String` representing the name qualifier.
        `value` - a `String` representing the name value.
      Returns:
        the constructed `NameIDType` instance.

    - #### createConditions

          public static ConditionsType createConditions(XMLGregorianCalendar notBefore,
                                                        XMLGregorianCalendar notOnOrAfter,
                                                        ConditionAbstractType... restrictions)

      Creates a `Conditions` instance with the specified values.

      Parameters:
        `notBefore` - a `XMLGregorianCalendar` representing the start of the token lifetime period.
        `notOnOrAfter` - a `XMLGregorianCalendar` representing the end of the token lifetime period.
        `restrictions` - an array containing the applicable restrictions.
      Returns:
        the constructed `Conditions` instance.

    - #### createKeyInfoConfirmation

          public static KeyInfoConfirmationDataType createKeyInfoConfirmation(KeyInfoType keyInfo)

      Creates a `KeyInfoConfirmationDataType` with the specified `KeyInfoType`.

      Parameters:
        `keyInfo` - the `KeyInfoType` object that wraps the proof-of-possession token.
      Returns:
        the constructed `KeyInfoConfirmationDataType` instance.

    - #### createSubjectConfirmation

          public static SubjectConfirmationType createSubjectConfirmation(NameIDType nameID,
                                                                          String confirmationMethod,
                                                                          KeyInfoConfirmationDataType keyInfoData)

      Creates a `SubjectConfirmationType` object with the specified values.

      Parameters:
        `nameID` - the identifier of the confirmation.
        `confirmationMethod` - a `String` representing the confirmation method.
        `keyInfoData` - the `KeyInfoConfirmationDataType` instance that contains the proof of possession key.
      Returns:
        the constructed `SubjectConfirmationType` instance.

    - #### createSubject

          public static SubjectType createSubject(NameIDType nameID,
                                                  SubjectConfirmationType confirmation)

      Creates a `SubjectType` object with the specified values.

      Parameters:
        `nameID` - the identifier of the subject.
        `confirmation` - the `SubjectConfirmationType` that is used to establish the correspondence between the subject and claims of SAML statements.
      Returns:
        the constructed `SubjectType` instance.

    - #### createAssertion

          public static AssertionType createAssertion(String id,
                                                      NameIDType issuerID,
                                                      XMLGregorianCalendar issueInstant,
                                                      ConditionsType conditions,
                                                      SubjectType subject,
                                                      List<StatementAbstractType> statements)

      Creates a SAMLV2 `AssertionType` with the specified values.

      Parameters:
        `id` - a `String` representing the assertion ID.
        `issuerID` - a `NameIDType` that identifies the assertion issuer.
        `issueInstant` - the assertion time of creation.
        `conditions` - the `ConditionsType` that specify the conditions under which the assertion is to be considered valid
        `subject` - the `SubjectType` that identifies the authenticated principal.
        `statements` - a list of statements associated with the authenticated principal.
      Returns:

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