Class HTTPPostDecoder

  • All Implemented Interfaces:
    net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.InitializableComponent, net.shibboleth.utilities.java.support.component.UnmodifiableComponent, org.opensaml.messaging.decoder.MessageDecoder, org.opensaml.messaging.decoder.servlet.HttpServletRequestMessageDecoder, org.opensaml.saml.common.binding.decoding.SAMLMessageDecoder
    Direct Known Subclasses:
    HTTPPostSimpleSignDecoder

    public class HTTPPostDecoder
    extends org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXMLMessageDecoder
    implements org.opensaml.saml.common.binding.decoding.SAMLMessageDecoder
    Message decoder implementing the SAML 2.0 HTTP POST binding.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.opensaml.saml.common.binding.BindingDescriptor bindingDescriptor
      Optional BindingDescriptor to inject into SAMLBindingContext created.
      private Logger log
      Class logger.
    • Constructor Summary

      Constructors 
      Constructor Description
      HTTPPostDecoder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doDecode()
      protected InputStream getBase64DecodedMessage​(javax.servlet.http.HttpServletRequest request)
      Gets the Base64 encoded message from the request and decodes it.
      org.opensaml.saml.common.binding.BindingDescriptor getBindingDescriptor()
      Get an optional BindingDescriptor to inject into SAMLBindingContext created.
      String getBindingURI()
      protected void populateBindingContext​(org.opensaml.messaging.context.MessageContext messageContext)
      Populate the context which carries information specific to this binding.
      void setBindingDescriptor​(org.opensaml.saml.common.binding.BindingDescriptor descriptor)
      Set an optional BindingDescriptor to inject into SAMLBindingContext 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 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 Detail

      • log

        @Nonnull
        private final Logger log
        Class logger.
      • bindingDescriptor

        @Nullable
        private org.opensaml.saml.common.binding.BindingDescriptor bindingDescriptor
        Optional BindingDescriptor to inject into SAMLBindingContext created.
    • Constructor Detail

      • HTTPPostDecoder

        public HTTPPostDecoder()
    • Method Detail

      • getBindingURI

        @Nonnull
        @NotEmpty
        public String getBindingURI()
        Specified by:
        getBindingURI in interface org.opensaml.saml.common.binding.decoding.SAMLMessageDecoder
      • getBindingDescriptor

        @Nullable
        public org.opensaml.saml.common.binding.BindingDescriptor getBindingDescriptor()
        Get an optional BindingDescriptor to inject into SAMLBindingContext created.
        Returns:
        binding descriptor
      • setBindingDescriptor

        public void setBindingDescriptor​(@Nullable
                                         org.opensaml.saml.common.binding.BindingDescriptor descriptor)
        Set an optional BindingDescriptor to inject into SAMLBindingContext created.
        Parameters:
        descriptor - a binding descriptor
      • doDecode

        protected void doDecode()
                         throws org.opensaml.messaging.decoder.MessageDecodingException
        Specified by:
        doDecode in class org.opensaml.messaging.decoder.AbstractMessageDecoder
        Throws:
        org.opensaml.messaging.decoder.MessageDecodingException
      • getBase64DecodedMessage

        protected InputStream getBase64DecodedMessage​(javax.servlet.http.HttpServletRequest request)
                                               throws org.opensaml.messaging.decoder.MessageDecodingException
        Gets the Base64 encoded message from the request and decodes it.
        Parameters:
        request - the inbound HTTP servlet request
        Returns:
        decoded message
        Throws:
        org.opensaml.messaging.decoder.MessageDecodingException - thrown if the message does not contain a base64 encoded SAML message, or the message can not be base64-decoded.
      • populateBindingContext

        protected void populateBindingContext​(org.opensaml.messaging.context.MessageContext messageContext)
        Populate the context which carries information specific to this binding.
        Parameters:
        messageContext - the current message context