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 forceSignRedirectBindingAuthnRequest) |
Modifier and Type | Method and Description |
---|---|
protected String |
buildRedirectURL(org.opensaml.messaging.context.MessageContext<org.opensaml.saml.common.SAMLObject> messageContext,
String endpoint,
String message)
Builds the URL to redirect the client to.
|
protected String |
deflateAndBase64Encode(org.opensaml.saml.common.SAMLObject message)
DEFLATE (RFC1951) compresses the given SAML message.
|
protected void |
doEncode() |
protected void |
doInitialize() |
protected String |
generateSignature(org.opensaml.security.credential.Credential signingCredential,
String algorithmURI,
String queryString)
Generates the signature over the query string.
|
protected URI |
getEndpointURL(org.opensaml.messaging.context.MessageContext<org.opensaml.saml.common.SAMLObject> messageContext)
Gets the response URL from the message context.
|
protected String |
getSignatureAlgorithmURI(org.opensaml.xmlsec.SignatureSigningParameters signingParameters)
Gets the signature algorithm URI to use.
|
protected 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, setMessageContext
destroy, initialize, isDestroyed, isInitialized
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Pac4jHTTPRedirectDeflateEncoder(Pac4jSAMLResponse responseAdapter, boolean forceSignRedirectBindingAuthnRequest)
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.MessageEncodingException
protected 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.ComponentInitializationException
protected 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 String deflateAndBase64Encode(org.opensaml.saml.common.SAMLObject message) throws org.opensaml.messaging.encoder.MessageEncodingException
message
- SAML messageorg.opensaml.messaging.encoder.MessageEncodingException
- thrown if there is a problem compressing the messageprotected 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 String buildRedirectURL(org.opensaml.messaging.context.MessageContext<org.opensaml.saml.common.SAMLObject> messageContext, String endpoint, 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 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 String generateSignature(org.opensaml.security.credential.Credential signingCredential, String algorithmURI, 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 © 2017. All Rights Reserved.