Class HTTPArtifactEncoder

  • 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.encoder.MessageEncoder, org.opensaml.messaging.encoder.servlet.HttpServletResponseMessageEncoder, org.opensaml.saml.common.binding.encoding.SAMLMessageEncoder

    public class HTTPArtifactEncoder
    extends BaseSAML1MessageEncoder
    SAML 1.X HTTP Artifact message encoder.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.opensaml.saml.common.binding.artifact.SAMLArtifactMap artifactMap
      SAML artifact map used to store created artifacts for later retrival.
      private byte[] defaultArtifactType
      Default artifact type to use when encoding messages.
      private org.slf4j.Logger log
      Class logger.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doDestroy()
      protected void doEncode()
      protected void doInitialize()
      org.opensaml.saml.common.binding.artifact.SAMLArtifactMap getArtifactMap()
      Get the SAML artifact map to use.
      String getBindingURI()
      private String getInboundMessageIssuer​(org.opensaml.messaging.context.MessageContext messageContext)
      Get the requester.
      private String getOutboundMessageIssuer​(org.opensaml.messaging.context.MessageContext messageContext)
      Get the outbound message issuer.
      private byte[] getSAMLArtifactType​(org.opensaml.messaging.context.MessageContext messageContext)
      Get the SAML artifact type from the message context.
      void setArtifactMap​(org.opensaml.saml.common.binding.artifact.SAMLArtifactMap newArtifactMap)
      Set the SAML artifact map to use.
      private void storeSAMLArtifactType​(org.opensaml.messaging.context.MessageContext messageContext, byte[] artifactType)
      Store the SAML artifact type in the message context.
      • Methods inherited from class org.opensaml.messaging.encoder.servlet.BaseHttpServletResponseXMLMessageEncoder

        encode, getMessageToLog, logEncodedMessage, marshallMessage
      • Methods inherited from class org.opensaml.messaging.encoder.servlet.AbstractHttpServletResponseMessageEncoder

        getHttpServletResponse, setHttpServletResponse
      • Methods inherited from class org.opensaml.messaging.encoder.AbstractMessageEncoder

        getMessageContext, prepareContext, 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.encoder.MessageEncoder

        encode, prepareContext, setMessageContext
    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • artifactMap

        @NonnullAfterInit
        private org.opensaml.saml.common.binding.artifact.SAMLArtifactMap artifactMap
        SAML artifact map used to store created artifacts for later retrival.
      • defaultArtifactType

        @Nonnull
        @NotEmpty
        private byte[] defaultArtifactType
        Default artifact type to use when encoding messages.
    • Constructor Detail

      • HTTPArtifactEncoder

        public HTTPArtifactEncoder()
        Constructor.
    • Method Detail

      • getBindingURI

        public String getBindingURI()
      • getArtifactMap

        @NonnullAfterInit
        public org.opensaml.saml.common.binding.artifact.SAMLArtifactMap getArtifactMap()
        Get the SAML artifact map to use.
        Returns:
        the artifactMap.
      • setArtifactMap

        public void setArtifactMap​(@Nonnull
                                   org.opensaml.saml.common.binding.artifact.SAMLArtifactMap newArtifactMap)
        Set the SAML artifact map to use.
        Parameters:
        newArtifactMap - the new artifactMap
      • doInitialize

        protected void doInitialize()
                             throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
        Overrides:
        doInitialize in class org.opensaml.messaging.encoder.servlet.AbstractHttpServletResponseMessageEncoder
        Throws:
        net.shibboleth.utilities.java.support.component.ComponentInitializationException
      • doDestroy

        protected void doDestroy()
        Overrides:
        doDestroy in class org.opensaml.messaging.encoder.servlet.AbstractHttpServletResponseMessageEncoder
      • doEncode

        protected void doEncode()
                         throws org.opensaml.messaging.encoder.MessageEncodingException
        Specified by:
        doEncode in class org.opensaml.messaging.encoder.AbstractMessageEncoder
        Throws:
        org.opensaml.messaging.encoder.MessageEncodingException
      • getOutboundMessageIssuer

        @Nullable
        private String getOutboundMessageIssuer​(@Nonnull
                                                org.opensaml.messaging.context.MessageContext messageContext)
        Get the outbound message issuer.
        Parameters:
        messageContext - the message context
        Returns:
        the outbound message issuer
      • getInboundMessageIssuer

        @Nullable
        private String getInboundMessageIssuer​(@Nonnull
                                               org.opensaml.messaging.context.MessageContext messageContext)
        Get the requester.
        Parameters:
        messageContext - the message context
        Returns:
        the requester
      • storeSAMLArtifactType

        private void storeSAMLArtifactType​(@Nonnull
                                           org.opensaml.messaging.context.MessageContext messageContext,
                                           @Nonnull @NotEmpty
                                           byte[] artifactType)
        Store the SAML artifact type in the message context.
        Parameters:
        messageContext - the message context
        artifactType - the artifact type to store
      • getSAMLArtifactType

        @Nullable
        private byte[] getSAMLArtifactType​(@Nonnull
                                           org.opensaml.messaging.context.MessageContext messageContext)
        Get the SAML artifact type from the message context.
        Parameters:
        messageContext - the message context
        Returns:
        the artifact type