Class HTTPRedirectDeflateDecoder
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
org.opensaml.messaging.decoder.AbstractMessageDecoder
org.opensaml.messaging.decoder.servlet.AbstractHttpServletRequestMessageDecoder
org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXMLMessageDecoder
org.opensaml.saml.saml2.binding.decoding.impl.HTTPRedirectDeflateDecoder
- All Implemented Interfaces:
Component
,DestructableComponent
,InitializableComponent
,UnmodifiableComponent
,MessageDecoder
,HttpServletRequestMessageDecoder
,SAMLMessageDecoder
public class HTTPRedirectDeflateDecoder extends BaseHttpServletRequestXMLMessageDecoder implements SAMLMessageDecoder
SAML 2.0 HTTP Redirect decoder using the DEFLATE encoding method.
This decoder only supports DEFLATE compression.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
HTTPRedirectDeflateDecoder.NoWrapAutoEndInflaterInputStream
A subclass ofInflaterInputStream
which defaults in a no-wrapInflater
instance and closes it when the stream is closed. -
Field Summary
Fields Modifier and Type Field Description private BindingDescriptor
bindingDescriptor
OptionalBindingDescriptor
to inject intoSAMLBindingContext
created.private org.slf4j.Logger
log
Class logger. -
Constructor Summary
Constructors Constructor Description HTTPRedirectDeflateDecoder()
-
Method Summary
Modifier and Type Method Description protected InputStream
decodeMessage(String message)
Base64 decodes the SAML message and then decompresses the message.protected void
doDecode()
Performs the decoding logic.BindingDescriptor
getBindingDescriptor()
Get an optionalBindingDescriptor
to inject intoSAMLBindingContext
created.String
getBindingURI()
Gets the SAML binding URI supported by this decoder.protected void
populateBindingContext(MessageContext messageContext)
Populate the context which carries information specific to this binding.void
setBindingDescriptor(BindingDescriptor descriptor)
Set an optionalBindingDescriptor
to inject intoSAMLBindingContext
created.Methods inherited from class org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXMLMessageDecoder
decode, doDestroy, doInitialize, getMessageToLog, getParserPool, logDecodedMessage, setParserPool, unmarshallMessage, validateHttpRequest
Methods inherited from class org.opensaml.messaging.decoder.servlet.AbstractHttpServletRequestMessageDecoder
getHttpServletRequest, setHttpServletRequest
Methods inherited from class org.opensaml.messaging.decoder.AbstractMessageDecoder
getMessageContext, setMessageContext
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
Methods inherited from interface org.opensaml.messaging.decoder.MessageDecoder
decode, getMessageContext
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
bindingDescriptor
OptionalBindingDescriptor
to inject intoSAMLBindingContext
created.
-
-
Constructor Details
-
HTTPRedirectDeflateDecoder
public HTTPRedirectDeflateDecoder()
-
-
Method Details
-
getBindingURI
Gets the SAML binding URI supported by this decoder.- Specified by:
getBindingURI
in interfaceSAMLMessageDecoder
- Returns:
- SAML binding URI supported by this decoder
-
getBindingDescriptor
Get an optionalBindingDescriptor
to inject intoSAMLBindingContext
created.- Returns:
- binding descriptor
-
setBindingDescriptor
Set an optionalBindingDescriptor
to inject intoSAMLBindingContext
created.- Parameters:
descriptor
- a binding descriptor
-
doDecode
Performs the decoding logic. By the time this is called, this decoder has already been initialized and checked to ensure that it has not been destroyed.- Specified by:
doDecode
in classAbstractMessageDecoder
- Throws:
MessageDecodingException
- thrown if there is a problem decoding the message
-
decodeMessage
Base64 decodes the SAML message and then decompresses the message.- Parameters:
message
- Base64 encoded, DEFALTE compressed, SAML message- Returns:
- the SAML message
- Throws:
MessageDecodingException
- thrown if the message can not be decoded
-
populateBindingContext
Populate the context which carries information specific to this binding.- Parameters:
messageContext
- the current message context
-