org.keycloak.protocol.saml

## Class SAML2BindingBuilder<T extends SAML2BindingBuilder>

- java.lang.Object
- - org.keycloak.protocol.saml.SAML2BindingBuilder<T>

- Direct Known Subclasses:
    SALM2LoginResponseBuilder, SAML2ErrorResponseBuilder, SAML2LogoutRequestBuilder

      public class SAML2BindingBuilder<T extends SAML2BindingBuilder>
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `SAML2BindingBuilder.PostBindingBuilder`
    `class` | `SAML2BindingBuilder.RedirectBindingBuilder`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `destination`
    `protected boolean` | `encrypt`
    `protected String` | `encryptionAlgorithm`
    `protected int` | `encryptionKeySize`
    `protected PublicKey` | `encryptionPublicKey`
    `protected String` | `relayState`
    `protected String` | `responseIssuer`
    `protected boolean` | `sign`
    `protected boolean` | `signAssertions`
    `protected SignatureAlgorithm` | `signatureAlgorithm`
    `protected X509Certificate` | `signingCertificate`
    `protected KeyPair` | `signingKeyPair`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SAML2BindingBuilder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected String` | `base64Encoded(Document document)`
    `protected String` | `buildHtml(String samlResponse)`
    `protected String` | `buildHtmlPostResponse(Document responseDoc)`
    `protected javax.ws.rs.core.Response` | `buildResponse(Document responseDoc)`
    `T` | `destination(String destination)`
    `T` | `encrypt(PublicKey publicKey)`
    `protected void` | `encryptDocument(Document samlDocument)`
    `T` | `encryptionAlgorithm(String alg)`
    `T` | `encryptionKeySize(int size)`
    `protected URI` | `generateRedirectUri(String samlParameterName, Document document)`
    `T` | `relayState(String relayState)`
    `T` | `responseIssuer(String issuer)`
    `protected void` | `signAssertion(Document samlDocument)`
    `T` | `signAssertions()`
    `T` | `signatureAlgorithm(SignatureAlgorithm alg)`
    `T` | `signDocument()`
    `protected void` | `signDocument(Document samlDocument)`
    `T` | `signWith(KeyPair keyPair)`
    `T` | `signWith(KeyPair keyPair, X509Certificate cert)`
    `T` | `signWith(PrivateKey privateKey, PublicKey publicKey)`
    `T` | `signWith(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

    - #### signingKeyPair

          protected KeyPair signingKeyPair

    - #### signingCertificate

          protected X509Certificate signingCertificate

    - #### sign

          protected boolean sign

    - #### signAssertions

          protected boolean signAssertions

    - #### signatureAlgorithm

          protected SignatureAlgorithm signatureAlgorithm

    - #### relayState

          protected String relayState

    - #### destination

          protected String destination

    - #### responseIssuer

          protected String responseIssuer

    - #### encryptionKeySize

          protected int encryptionKeySize

    - #### encryptionPublicKey

          protected PublicKey encryptionPublicKey

    - #### encryptionAlgorithm

          protected String encryptionAlgorithm

    - #### encrypt

          protected boolean encrypt

  - ### Constructor Detail

    - #### SAML2BindingBuilder

          public SAML2BindingBuilder()

  - ### Method Detail

    - #### signDocument

          public T signDocument()

    - #### signAssertions

          public T signAssertions()

    - #### signWith

          public T signWith(KeyPair keyPair)

    - #### signWith

          public T signWith(PrivateKey privateKey,
                   PublicKey publicKey)

    - #### signWith

          public T signWith(KeyPair keyPair,
                   X509Certificate cert)

    - #### signWith

          public T signWith(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)

    - #### destination

          public T destination(String destination)

    - #### responseIssuer

          public T responseIssuer(String issuer)

    - #### relayState

          public T relayState(String relayState)

    - #### encryptDocument

          protected void encryptDocument(Document samlDocument)
                                  throws org.picketlink.common.exceptions.ProcessingException

      Throws:
        `org.picketlink.common.exceptions.ProcessingException`

    - #### signDocument

          protected void signDocument(Document samlDocument)
                               throws org.picketlink.common.exceptions.ProcessingException

      Throws:
        `org.picketlink.common.exceptions.ProcessingException`

    - #### signAssertion

          protected void signAssertion(Document samlDocument)
                                throws org.picketlink.common.exceptions.ProcessingException

      Throws:
        `org.picketlink.common.exceptions.ProcessingException`

    - #### buildResponse

          protected javax.ws.rs.core.Response buildResponse(Document responseDoc)
                                                     throws org.picketlink.common.exceptions.ProcessingException,
                                                            org.picketlink.common.exceptions.ConfigurationException,
                                                            IOException

      Throws:
        `org.picketlink.common.exceptions.ProcessingException`
        `org.picketlink.common.exceptions.ConfigurationException`
        `IOException`

    - #### buildHtmlPostResponse

          protected String buildHtmlPostResponse(Document responseDoc)
                                          throws org.picketlink.common.exceptions.ProcessingException,
                                                 org.picketlink.common.exceptions.ConfigurationException,
                                                 IOException

      Throws:
        `org.picketlink.common.exceptions.ProcessingException`
        `org.picketlink.common.exceptions.ConfigurationException`
        `IOException`

    - #### buildHtml

          protected String buildHtml(String samlResponse)

    - #### base64Encoded

          protected String base64Encoded(Document document)
                                  throws org.picketlink.common.exceptions.ConfigurationException,
                                         org.picketlink.common.exceptions.ProcessingException,
                                         IOException

      Throws:
        `org.picketlink.common.exceptions.ConfigurationException`
        `org.picketlink.common.exceptions.ProcessingException`
        `IOException`

    - #### generateRedirectUri

          protected URI generateRedirectUri(String samlParameterName,
                                Document document)
                                     throws org.picketlink.common.exceptions.ConfigurationException,
                                            org.picketlink.common.exceptions.ProcessingException,
                                            IOException

      Throws:
        `org.picketlink.common.exceptions.ConfigurationException`
        `org.picketlink.common.exceptions.ProcessingException`
        `IOException`

Copyright © 2014. All Rights Reserved.