org.keycloak.saml

## Class BaseSAML2BindingBuilder<T extends BaseSAML2BindingBuilder>

- java.lang.Object
- - org.keycloak.saml.BaseSAML2BindingBuilder<T>

- Direct Known Subclasses:
    JaxrsSAML2BindingBuilder

      public class BaseSAML2BindingBuilder<T extends BaseSAML2BindingBuilder>
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `BaseSAML2BindingBuilder.BasePostBindingBuilder`
    `static class` | `BaseSAML2BindingBuilder.BaseRedirectBindingBuilder`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `canonicalizationMethodType`
    `protected boolean` | `encrypt`
    `protected String` | `encryptionAlgorithm`
    `protected int` | `encryptionKeySize`
    `protected PublicKey` | `encryptionPublicKey`
    `protected static org.jboss.logging.Logger` | `logger`
    `protected String` | `relayState`
    `protected boolean` | `sign`
    `protected boolean` | `signAssertions`
    `protected SignatureAlgorithm` | `signatureAlgorithm`
    `protected X509Certificate` | `signingCertificate`
    `protected String` | `signingKeyName`
    `protected KeyPair` | `signingKeyPair`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseSAML2BindingBuilder()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `base64Encoded(Document document)`
    `String` | `buildHtml(String samlResponse, String actionUrl, boolean asRequest)`
    `String` | `buildHtmlPostResponse(Document responseDoc, String actionUrl, boolean asRequest)`
    `T` | `canonicalizationMethod(String method)`
    `T` | `encrypt(PublicKey publicKey)`
    `void` | `encryptDocument(Document samlDocument)`
    `T` | `encryptionAlgorithm(String alg)`
    `T` | `encryptionKeySize(int size)`
    `URI` | `generateRedirectUri(String samlParameterName, String redirectUri, Document document)`
    `String` | `getSAMLNSPrefix(Document samlResponseDocument)`
    `static String` | `getSAMLResponse(Document responseDoc)`
    `BaseSAML2BindingBuilder.BasePostBindingBuilder` | `postBinding(Document document)`
    `BaseSAML2BindingBuilder.BaseRedirectBindingBuilder` | `redirectBinding(Document document)`
    `T` | `relayState(String relayState)`
    `void` | `signAssertion(Document samlDocument)`
    `T` | `signAssertions()`
    `T` | `signatureAlgorithm(SignatureAlgorithm alg)`
    `T` | `signDocument()`
    `void` | `signDocument(Document samlDocument)`
    `T` | `signWith(String signingKeyName, KeyPair keyPair)`
    `T` | `signWith(String signingKeyName, KeyPair keyPair, X509Certificate cert)`
    `T` | `signWith(String signingKeyName, PrivateKey privateKey, PublicKey publicKey)`
    `T` | `signWith(String signingKeyName, PrivateKey privateKey, PublicKey publicKey, X509Certificate cert)`

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

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

- - ### Field Detail

    - #### logger

          protected static final org.jboss.logging.Logger logger

    - #### signingKeyName

          protected String signingKeyName

    - #### signingKeyPair

          protected KeyPair signingKeyPair

    - #### signingCertificate

          protected X509Certificate signingCertificate

    - #### sign

          protected boolean sign

    - #### signAssertions

          protected boolean signAssertions

    - #### signatureAlgorithm

          protected SignatureAlgorithm signatureAlgorithm

    - #### relayState

          protected String relayState

    - #### encryptionKeySize

          protected int encryptionKeySize

    - #### encryptionPublicKey

          protected PublicKey encryptionPublicKey

    - #### encryptionAlgorithm

          protected String encryptionAlgorithm

    - #### encrypt

          protected boolean encrypt

    - #### canonicalizationMethodType

          protected String canonicalizationMethodType

  - ### Constructor Detail

    - #### BaseSAML2BindingBuilder

          public BaseSAML2BindingBuilder()

  - ### Method Detail

    - #### canonicalizationMethod

          public T canonicalizationMethod(String method)

    - #### signDocument

          public T signDocument()

    - #### signAssertions

          public T signAssertions()

    - #### signWith

          public T signWith(String signingKeyName,
                            KeyPair keyPair)

    - #### signWith

          public T signWith(String signingKeyName,
                            PrivateKey privateKey,
                            PublicKey publicKey)

    - #### signWith

          public T signWith(String signingKeyName,
                            KeyPair keyPair,
                            X509Certificate cert)

    - #### signWith

          public T signWith(String signingKeyName,
                            PrivateKey privateKey,
                            PublicKey publicKey,
                            X509Certificate cert)

    - #### signatureAlgorithm

          public T signatureAlgorithm(SignatureAlgorithm alg)

    - #### encrypt

          public T encrypt(PublicKey publicKey)

    - #### encryptionAlgorithm

          public T encryptionAlgorithm(String alg)

    - #### encryptionKeySize

          public T encryptionKeySize(int size)

    - #### relayState

          public T relayState(String relayState)

    - #### redirectBinding

          public BaseSAML2BindingBuilder.BaseRedirectBindingBuilder redirectBinding(Document document)
                                                                             throws ProcessingException

      Throws:
        `ProcessingException`

    - #### postBinding

          public BaseSAML2BindingBuilder.BasePostBindingBuilder postBinding(Document document)
                                                                     throws ProcessingException

      Throws:
        `ProcessingException`

    - #### getSAMLNSPrefix

          public String getSAMLNSPrefix(Document samlResponseDocument)

    - #### encryptDocument

          public void encryptDocument(Document samlDocument)
                               throws ProcessingException

      Throws:
        `ProcessingException`

    - #### signDocument

          public void signDocument(Document samlDocument)
                            throws ProcessingException

      Throws:
        `ProcessingException`

    - #### signAssertion

          public void signAssertion(Document samlDocument)
                             throws ProcessingException

      Throws:
        `ProcessingException`

    - #### buildHtmlPostResponse

          public String buildHtmlPostResponse(Document responseDoc,
                                              String actionUrl,
                                              boolean asRequest)
                                       throws ProcessingException,
                                              ConfigurationException,
                                              IOException

      Throws:
        `ProcessingException`
        `ConfigurationException`
        `IOException`

    - #### getSAMLResponse

          public static String getSAMLResponse(Document responseDoc)
                                        throws ProcessingException,
                                               ConfigurationException,
                                               IOException

      Throws:
        `ProcessingException`
        `ConfigurationException`
        `IOException`

    - #### buildHtml

          public String buildHtml(String samlResponse,
                                  String actionUrl,
                                  boolean asRequest)

    - #### base64Encoded

          public String base64Encoded(Document document)
                               throws ConfigurationException,
                                      ProcessingException,
                                      IOException

      Throws:
        `ConfigurationException`
        `ProcessingException`
        `IOException`

    - #### generateRedirectUri

          public URI generateRedirectUri(String samlParameterName,
                                         String redirectUri,
                                         Document document)
                                  throws ConfigurationException,
                                         ProcessingException,
                                         IOException

      Throws:
        `ConfigurationException`
        `ProcessingException`
        `IOException`

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