org.keycloak.saml

## Class SAML2LoginResponseBuilder

- java.lang.Object
- - org.keycloak.saml.SAML2LoginResponseBuilder

- All Implemented Interfaces:
    SamlProtocolExtensionsAwareBuilder<SAML2LoginResponseBuilder>

      public class SAML2LoginResponseBuilder
      extends Object
      implements SamlProtocolExtensionsAwareBuilder<SAML2LoginResponseBuilder>

  Handles for dealing with SAML2 Authentication

  Configuration Options:
  Author:
    bburke@redhat.com

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.keycloak.saml.SamlProtocolExtensionsAwareBuilder

      `SamlProtocolExtensionsAwareBuilder.NodeGenerator`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `assertionExpiration`
    `protected String` | `authMethod`
    `protected String` | `destination`
    `protected boolean` | `disableAuthnStatement`
    `protected List<SamlProtocolExtensionsAwareBuilder.NodeGenerator>` | `extensions`
    `protected boolean` | `includeOneTimeUseCondition`
    `protected NameIDType` | `issuer`
    `protected static PicketLinkLogger` | `logger`
    `protected boolean` | `multiValuedRoles`
    `protected String` | `nameId`
    `protected String` | `nameIdFormat`
    `protected String` | `requestID`
    `protected String` | `requestIssuer`
    `protected int` | `sessionExpiration`
    `protected String` | `sessionIndex`
    `protected int` | `subjectExpiration`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SAML2LoginResponseBuilder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SAML2LoginResponseBuilder` | `addExtension(SamlProtocolExtensionsAwareBuilder.NodeGenerator extension)` Adds a given node subtree as a SAML protocol extension into the SAML protocol message.
    `SAML2LoginResponseBuilder` | `assertionExpiration(int assertionExpiration)` Length of time in seconds the assertion is valid for See SAML core specification 2.5.1.2 NotOnOrAfter
    `SAML2LoginResponseBuilder` | `authMethod(String authMethod)`
    `Document` | `buildDocument(ResponseType responseType)`
    `ResponseType` | `buildModel()`
    `SAML2LoginResponseBuilder` | `destination(String destination)`
    `SAML2LoginResponseBuilder` | `disableAuthnStatement(boolean disableAuthnStatement)`
    `SAML2LoginResponseBuilder` | `includeOneTimeUseCondition(boolean includeOneTimeUseCondition)`
    `SAML2LoginResponseBuilder` | `issuer(NameIDType issuer)`
    `SAML2LoginResponseBuilder` | `issuer(String issuer)`
    `SAML2LoginResponseBuilder` | `multiValuedRoles(boolean multiValuedRoles)`
    `SAML2LoginResponseBuilder` | `nameIdentifier(String nameIdFormat, String nameId)`
    `SAML2LoginResponseBuilder` | `requestID(String requestID)`
    `SAML2LoginResponseBuilder` | `requestIssuer(String requestIssuer)`
    `SAML2LoginResponseBuilder` | `sessionExpiration(int sessionExpiration)` Length of time in seconds the idp session will be valid See SAML core specification 2.7.2 SessionNotOnOrAfter
    `SAML2LoginResponseBuilder` | `sessionIndex(String sessionIndex)`
    `SAML2LoginResponseBuilder` | `subjectExpiration(int subjectExpiration)` Length of time in seconds the subject can be confirmed See SAML core specification 2.4.1.2 NotOnOrAfter

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

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

- - ### Field Detail

    - #### logger

          protected static final PicketLinkLogger logger

    - #### destination

          protected String destination

    - #### issuer

          protected NameIDType issuer

    - #### subjectExpiration

          protected int subjectExpiration

    - #### assertionExpiration

          protected int assertionExpiration

    - #### sessionExpiration

          protected int sessionExpiration

    - #### nameId

          protected String nameId

    - #### nameIdFormat

          protected String nameIdFormat

    - #### multiValuedRoles

          protected boolean multiValuedRoles

    - #### disableAuthnStatement

          protected boolean disableAuthnStatement

    - #### requestID

          protected String requestID

    - #### authMethod

          protected String authMethod

    - #### requestIssuer

          protected String requestIssuer

    - #### sessionIndex

          protected String sessionIndex

    - #### extensions

          protected final List<SamlProtocolExtensionsAwareBuilder.NodeGenerator> extensions

    - #### includeOneTimeUseCondition

          protected boolean includeOneTimeUseCondition

  - ### Constructor Detail

    - #### SAML2LoginResponseBuilder

          public SAML2LoginResponseBuilder()

  - ### Method Detail

    - #### sessionIndex

          public SAML2LoginResponseBuilder sessionIndex(String sessionIndex)

    - #### destination

          public SAML2LoginResponseBuilder destination(String destination)

    - #### issuer

          public SAML2LoginResponseBuilder issuer(NameIDType issuer)

    - #### issuer

          public SAML2LoginResponseBuilder issuer(String issuer)

    - #### subjectExpiration

          public SAML2LoginResponseBuilder subjectExpiration(int subjectExpiration)

      Length of time in seconds the subject can be confirmed See SAML core specification 2.4.1.2 NotOnOrAfter
      Parameters:
        `subjectExpiration` - Number of seconds the subject should be valid
      Returns:

    - #### sessionExpiration

          public SAML2LoginResponseBuilder sessionExpiration(int sessionExpiration)

      Length of time in seconds the idp session will be valid See SAML core specification 2.7.2 SessionNotOnOrAfter
      Parameters:
        `sessionExpiration` - Number of seconds the session should be valid
      Returns:

    - #### assertionExpiration

          public SAML2LoginResponseBuilder assertionExpiration(int assertionExpiration)

      Length of time in seconds the assertion is valid for See SAML core specification 2.5.1.2 NotOnOrAfter
      Parameters:
        `assertionExpiration` - Number of seconds the assertion should be valid
      Returns:

    - #### requestID

          public SAML2LoginResponseBuilder requestID(String requestID)

    - #### requestIssuer

          public SAML2LoginResponseBuilder requestIssuer(String requestIssuer)

    - #### authMethod

          public SAML2LoginResponseBuilder authMethod(String authMethod)

    - #### nameIdentifier

          public SAML2LoginResponseBuilder nameIdentifier(String nameIdFormat,
                                                          String nameId)

    - #### multiValuedRoles

          public SAML2LoginResponseBuilder multiValuedRoles(boolean multiValuedRoles)

    - #### disableAuthnStatement

          public SAML2LoginResponseBuilder disableAuthnStatement(boolean disableAuthnStatement)

    - #### includeOneTimeUseCondition

          public SAML2LoginResponseBuilder includeOneTimeUseCondition(boolean includeOneTimeUseCondition)

    - #### addExtension

          public SAML2LoginResponseBuilder addExtension(SamlProtocolExtensionsAwareBuilder.NodeGenerator extension)

      Description copied from interface: `SamlProtocolExtensionsAwareBuilder`
      Adds a given node subtree as a SAML protocol extension into the SAML protocol message.
      Specified by:
        `addExtension` in interface `SamlProtocolExtensionsAwareBuilder<SAML2LoginResponseBuilder>`
      Returns:

    - #### buildDocument

          public Document buildDocument(ResponseType responseType)
                                 throws ConfigurationException,
                                        ProcessingException

      Throws:
        `ConfigurationException`
        `ProcessingException`

    - #### buildModel

          public ResponseType buildModel()
                                  throws ConfigurationException,
                                         ProcessingException

      Throws:
        `ConfigurationException`
        `ProcessingException`

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