org.keycloak.protocol.saml

## Class SAML2BindingBuilder2<T extends SAML2BindingBuilder2>

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

-     public class SAML2BindingBuilder2<T extends SAML2BindingBuilder2>
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

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

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `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 KeyPair` | `signingKeyPair`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SAML2BindingBuilder2()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected String` | `base64Encoded(Document document)`
    `protected String` | `buildHtml(String samlResponse, String actionUrl, boolean asRequest)`
    `protected String` | `buildHtmlPostResponse(Document responseDoc, String actionUrl, boolean asRequest)`
    `protected javax.ws.rs.core.Response` | `buildResponse(Document responseDoc, String actionUrl, boolean asRequest)`
    `T` | `encrypt(PublicKey publicKey)`
    `protected void` | `encryptDocument(Document samlDocument)`
    `T` | `encryptionAlgorithm(String alg)`
    `T` | `encryptionKeySize(int size)`
    `protected URI` | `generateRedirectUri(String samlParameterName, String redirectUri, Document document)`
    `SAML2BindingBuilder2.PostBindingBuilder` | `postBinding(Document document)`
    `SAML2BindingBuilder2.RedirectBindingBuilder` | `redirectBinding(Document document)`
    `T` | `relayState(String relayState)`
    `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

    - #### logger

          protected static final org.jboss.logging.Logger logger

    - #### 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

  - ### Constructor Detail

    - #### SAML2BindingBuilder2

          public SAML2BindingBuilder2()

  - ### 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)

    - #### 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,
                                                String actionUrl,
                                                boolean asRequest)
                                                     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,
                                     String actionUrl,
                                     boolean asRequest)
                                          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,
                         String actionUrl,
                         boolean asRequest)

    - #### 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,
                                String redirectUri,
                                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`

    - #### redirectBinding

          public SAML2BindingBuilder2.RedirectBindingBuilder redirectBinding(Document document)
                                                                      throws org.picketlink.common.exceptions.ProcessingException

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

    - #### postBinding

          public SAML2BindingBuilder2.PostBindingBuilder postBinding(Document document)
                                                              throws org.picketlink.common.exceptions.ProcessingException

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

Copyright © 2015. All rights reserved.