public class HTTPRedirectDeflateEncoder extends BaseSAML2MessageEncoder
| Modifier and Type | Class and Description |
|---|---|
private class |
HTTPRedirectDeflateEncoder.NoWrapAutoEndDeflaterOutputStream
A subclass of
DeflaterOutputStream which defaults in a no-wrap Deflater instance and
closes it when the stream is closed. |
| Modifier and Type | Field and Description |
|---|---|
private static Set<String> |
DISALLOWED_ENDPOINT_QUERY_PARAMS
Params which are disallowed from appearing in the input endpoint URL.
|
private Logger |
log
Class logger.
|
| Constructor and Description |
|---|
HTTPRedirectDeflateEncoder()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildRedirectURL(org.opensaml.messaging.context.MessageContext<SAMLObject> messageContext,
String endpoint,
String message)
Builds the URL to redirect the client to.
|
protected String |
deflateAndBase64Encode(SAMLObject message)
DEFLATE (RFC1951) compresses the given SAML message.
|
protected void |
doEncode() |
protected String |
generateSignature(org.opensaml.security.credential.Credential signingCredential,
String algorithmURI,
String queryString)
Generates the signature over the query string.
|
String |
getBindingURI() |
protected String |
getSignatureAlgorithmURI(org.opensaml.xmlsec.SignatureSigningParameters signingParameters)
Gets the signature algorithm URI to use.
|
protected void |
removeDisallowedQueryParams(List<net.shibboleth.utilities.java.support.collection.Pair<String,String>> queryParams)
Remove disallowed query params from the supplied list.
|
protected void |
removeSignature(SAMLObject message)
Removes the signature from the protocol message.
|
getEndpointURLencode, getMessageToLog, logEncodedMessage, marshallMessagedoDestroy, doInitialize, getHttpServletResponse, setHttpServletResponsegetMessageContext, prepareContext, setMessageContextdestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitencode, prepareContext, setMessageContextprivate static final Set<String> DISALLOWED_ENDPOINT_QUERY_PARAMS
private final Logger log
public String getBindingURI()
protected void doEncode()
throws org.opensaml.messaging.encoder.MessageEncodingException
doEncode in class org.opensaml.messaging.encoder.AbstractMessageEncoder<SAMLObject>org.opensaml.messaging.encoder.MessageEncodingExceptionprotected void removeSignature(SAMLObject message)
message - current message contextprotected String deflateAndBase64Encode(SAMLObject message) throws org.opensaml.messaging.encoder.MessageEncodingException
message - SAML messageorg.opensaml.messaging.encoder.MessageEncodingException - thrown if there is a problem compressing the messageprotected String buildRedirectURL(org.opensaml.messaging.context.MessageContext<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 void removeDisallowedQueryParams(@Nonnull List<net.shibboleth.utilities.java.support.collection.Pair<String,String>> queryParams)
queryParams - the list of query params on which to operateprotected 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 © 1999–2020 Shibboleth Consortium. All rights reserved.