Class HTTPArtifactEncoder

    • Field Detail

      • log

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

        private boolean postEncoding
        Whether the POST encoding should be used, instead of GET.
      • velocityEngine

        @Nullable
        private org.apache.velocity.app.VelocityEngine velocityEngine
        Velocity engine used to evaluate the template when performing POST encoding.
      • velocityTemplateId

        @Nonnull
        @NotEmpty
        private String velocityTemplateId
        ID of the velocity template used when performing POST encoding.
      • 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()
      • isPostEncoding

        public boolean isPostEncoding()
        Get whether the encoder will encode the artifact via POST encoding.
        Returns:
        true if POST encoding will be used, false if GET encoding will be used
      • setPostEncoding

        public void setPostEncoding​(boolean post)
        Set whether the encoder will encode the artifact via POST encoding.
        Parameters:
        post - true if POST encoding will be used, false if GET encoding will be used
      • getVelocityEngine

        @Nullable
        public org.apache.velocity.app.VelocityEngine getVelocityEngine()
        Get the VelocityEngine instance.
        Returns:
        return the VelocityEngine instance
      • setVelocityEngine

        public void setVelocityEngine​(@Nullable
                                      org.apache.velocity.app.VelocityEngine newVelocityEngine)
        Set the VelocityEngine instance.
        Parameters:
        newVelocityEngine - the new VelocityEngine instane
      • getVelocityTemplateId

        @Nonnull
        @NotEmpty
        public String getVelocityTemplateId()
        Get the Velocity template id.

        Defaults to DEFAULT_TEMPLATE_ID.

        Returns:
        return the Velocity template id
      • setVelocityTemplateId

        public void setVelocityTemplateId​(@Nonnull @NotEmpty
                                          String newVelocityTemplateId)
        Set the Velocity template id.

        Defaults to DEFAULT_TEMPLATE_ID.

        Parameters:
        newVelocityTemplateId - the new Velocity template id
      • setArtifactMap

        public void setArtifactMap​(@Nonnull
                                   SAMLArtifactMap newArtifactMap)
        Set the SAML artifact map to use.
        Parameters:
        newArtifactMap - the new artifactMap
      • getOutboundMessageIssuer

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

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

        private void storeSAMLArtifactType​(@Nonnull
                                           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
                                           MessageContext messageContext)
        Get the SAML artifact type from the message context.
        Parameters:
        messageContext - the message context
        Returns:
        the artifact type