Package 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 Description classBaseSAML2BindingBuilder.BasePostBindingBuilderstatic classBaseSAML2BindingBuilder.BaseRedirectBindingBuilderstatic classBaseSAML2BindingBuilder.BaseSoapBindingBuilder
-
Field Summary
Fields Modifier and Type Field Description protected StringcanonicalizationMethodTypeprotected booleanencryptprotected StringencryptionAlgorithmprotected intencryptionKeySizeprotected PublicKeyencryptionPublicKeyprotected StringkeyEncryptionAlgorithmprotected StringkeyEncryptionDigestMethodprotected StringkeyEncryptionMgfAlgorithmprotected static org.jboss.logging.Loggerloggerprotected StringrelayStateprotected booleansignprotected booleansignAssertionsprotected SignatureAlgorithmsignatureAlgorithmprotected X509CertificatesigningCertificateprotected StringsigningKeyNameprotected KeyPairsigningKeyPair
-
Constructor Summary
Constructors Constructor Description BaseSAML2BindingBuilder()
-
Method Summary
-
-
-
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
-
keyEncryptionAlgorithm
protected String keyEncryptionAlgorithm
-
keyEncryptionDigestMethod
protected String keyEncryptionDigestMethod
-
keyEncryptionMgfAlgorithm
protected String keyEncryptionMgfAlgorithm
-
-
Method Detail
-
signDocument
public T signDocument()
-
signAssertions
public T signAssertions()
-
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)
-
encryptionKeySize
public T encryptionKeySize(int size)
-
redirectBinding
public BaseSAML2BindingBuilder.BaseRedirectBindingBuilder redirectBinding(Document document) throws ProcessingException
- Throws:
ProcessingException
-
postBinding
public BaseSAML2BindingBuilder.BasePostBindingBuilder postBinding(Document document) throws ProcessingException
- Throws:
ProcessingException
-
soapBinding
public BaseSAML2BindingBuilder.BaseSoapBindingBuilder soapBinding(Document document) throws ProcessingException
- Throws:
ProcessingException
-
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
-
getSAMLResponse
public static String getSAMLResponse(Document responseDoc) throws ProcessingException, ConfigurationException, IOException
-
base64Encoded
public String base64Encoded(Document document) throws ConfigurationException, ProcessingException, IOException
-
generateRedirectUri
public URI generateRedirectUri(String samlParameterName, String redirectUri, Document document) throws ConfigurationException, ProcessingException, IOException
-
-