public class Pac4jHTTPRedirectDeflateEncoder
extends org.opensaml.messaging.encoder.AbstractMessageEncoder<org.opensaml.saml.common.SAMLObject>
AbstractMessageEncoder as intermediate classes use the J2E HTTP response.
It's mostly a copy/paste of the source code of these intermediate opensaml classes.| Constructor and Description |
|---|
Pac4jHTTPRedirectDeflateEncoder(Pac4jSAMLResponse responseAdapter,
boolean isAuthnRequestSigned) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
buildRedirectURL(org.opensaml.messaging.context.MessageContext<org.opensaml.saml.common.SAMLObject> messageContext,
java.lang.String endpoint,
java.lang.String message)
Builds the URL to redirect the client to.
|
protected void |
doEncode() |
protected void |
doInitialize() |
protected java.lang.String |
generateSignature(org.opensaml.security.credential.Credential signingCredential,
java.lang.String algorithmURI,
java.lang.String queryString)
Generates the signature over the query string.
|
protected java.net.URI |
getEndpointURL(org.opensaml.messaging.context.MessageContext<org.opensaml.saml.common.SAMLObject> messageContext)
Gets the response URL from the message context.
|
protected java.lang.String |
getSignatureAlgorithmURI(org.opensaml.xmlsec.SignatureSigningParameters signingParameters)
Gets the signature algorithm URI to use.
|
protected org.w3c.dom.Element |
marshallMessage(org.opensaml.core.xml.XMLObject message)
Helper method that marshalls the given message.
|
protected void |
removeSignature(org.opensaml.saml.common.SAMLObject message)
Removes the signature from the protocol message.
|
doDestroy, encode, getMessageContext, prepareContext, setMessageContextdestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic Pac4jHTTPRedirectDeflateEncoder(Pac4jSAMLResponse responseAdapter, boolean isAuthnRequestSigned)
protected void doEncode()
throws org.opensaml.messaging.encoder.MessageEncodingException
doEncode in class org.opensaml.messaging.encoder.AbstractMessageEncoder<org.opensaml.saml.common.SAMLObject>org.opensaml.messaging.encoder.MessageEncodingExceptionprotected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class org.opensaml.messaging.encoder.AbstractMessageEncoder<org.opensaml.saml.common.SAMLObject>net.shibboleth.utilities.java.support.component.ComponentInitializationExceptionprotected java.net.URI getEndpointURL(org.opensaml.messaging.context.MessageContext<org.opensaml.saml.common.SAMLObject> messageContext)
throws org.opensaml.messaging.encoder.MessageEncodingException
messageContext - current message contextorg.opensaml.messaging.encoder.MessageEncodingException - throw if no relying party endpoint is availableprotected void removeSignature(org.opensaml.saml.common.SAMLObject message)
message - current message contextprotected org.w3c.dom.Element marshallMessage(org.opensaml.core.xml.XMLObject message)
throws org.opensaml.messaging.encoder.MessageEncodingException
message - message the marshall and serializeorg.opensaml.messaging.encoder.MessageEncodingException - thrown if the give message can not be marshalled into its DOM representationprotected java.lang.String buildRedirectURL(org.opensaml.messaging.context.MessageContext<org.opensaml.saml.common.SAMLObject> messageContext,
java.lang.String endpoint,
java.lang.String message)
throws org.opensaml.messaging.encoder.MessageEncodingException
messageContext - current message contextendpoint - endpoint URL to send encoded message tomessage - Deflated and Base64 encoded messageorg.opensaml.messaging.encoder.MessageEncodingException - thrown if the SAML message is neither a RequestAbstractType or Responseprotected java.lang.String getSignatureAlgorithmURI(org.opensaml.xmlsec.SignatureSigningParameters signingParameters)
throws org.opensaml.messaging.encoder.MessageEncodingException
signingParameters - the signing parameters to useorg.opensaml.messaging.encoder.MessageEncodingException - thrown if the algorithm URI is not supplied explicitly and
could not be derived from the supplied credentialprotected java.lang.String generateSignature(org.opensaml.security.credential.Credential signingCredential,
java.lang.String algorithmURI,
java.lang.String queryString)
throws org.opensaml.messaging.encoder.MessageEncodingException
signingCredential - credential that will be used to sign query stringalgorithmURI - algorithm URI of the signing credentialqueryString - query string to be signedorg.opensaml.messaging.encoder.MessageEncodingException - there is an error computing the signatureCopyright © 2019. All Rights Reserved.