Class Pac4jHTTPArtifactDecoder

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.decoder.AbstractMessageDecoder
org.pac4j.saml.transport.Pac4jHTTPArtifactDecoder
All Implemented Interfaces:
net.shibboleth.shared.component.Component, net.shibboleth.shared.component.DestructableComponent, net.shibboleth.shared.component.InitializableComponent, net.shibboleth.shared.component.UnmodifiableComponent, org.opensaml.messaging.decoder.MessageDecoder, org.opensaml.saml.common.binding.decoding.SAMLMessageDecoder

public class Pac4jHTTPArtifactDecoder extends org.opensaml.messaging.decoder.AbstractMessageDecoder implements org.opensaml.saml.common.binding.decoding.SAMLMessageDecoder
Decoder for the artifact binding: it's like the original HTTPArtifactDecoder but using a web context instead of the JEE HTTP servlet request.
Since:
3.8.0
Author:
Jerome LELEU
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    protected void
    protected void
    protected void
    org.opensaml.saml.saml2.binding.artifact.SAML2ArtifactBuilderFactory
    Get the SAML 2 artifact builder factory.
    org.opensaml.saml.common.binding.EndpointResolver<org.opensaml.saml.saml2.metadata.ArtifactResolutionService>
    Get the artifact endpoint resolver.
    org.opensaml.saml.common.binding.BindingDescriptor
    Get an optional BindingDescriptor to inject into SAMLBindingContext created.
    net.shibboleth.shared.security.IdentifierGenerationStrategy
    Get the identifier generation strategy.
    net.shibboleth.shared.xml.ParserPool
    Gets the parser pool used to deserialize incoming messages.
    Get the peer entity role QName.
    org.opensaml.saml.metadata.resolver.RoleDescriptorResolver
    Get the role descriptor resolver.
    net.shibboleth.shared.resolver.Resolver<String,net.shibboleth.shared.resolver.CriteriaSet>
    Get the resolver for the self entityID.
    org.opensaml.soap.client.SOAPClient
    Get the SOAP client instance.
    Get the SOAP client security configuration profile ID to use.
    Get the name of the specific SOAP client message pipeline to use, for example with PipelineFactoryHttpSOAPClient.
    protected void
    populateBindingContext(org.opensaml.messaging.context.MessageContext messageContext)
    Populate the context which carries information specific to this binding.
    void
    setArtifactBuilderFactory(org.opensaml.saml.saml2.binding.artifact.SAML2ArtifactBuilderFactory factory)
    Set the SAML 2 artifact builder factory.
    void
    setArtifactEndpointResolver(org.opensaml.saml.common.binding.EndpointResolver<org.opensaml.saml.saml2.metadata.ArtifactResolutionService> resolver)
    Set the artifact endpoint resolver.
    void
    setBindingDescriptor(org.opensaml.saml.common.binding.BindingDescriptor descriptor)
    Set an optional BindingDescriptor to inject into SAMLBindingContext created.
    void
    setIdentifierGenerationStrategy(net.shibboleth.shared.security.IdentifierGenerationStrategy strategy)
    Set the identifier generation strategy.
    void
    setParserPool(net.shibboleth.shared.xml.ParserPool pool)
    Sets the parser pool used to deserialize incoming messages.
    void
    Set the peer entity role QName.
    void
    setRoleDescriptorResolver(org.opensaml.saml.metadata.resolver.RoleDescriptorResolver resolver)
    Set the role descriptor resolver.
    void
    setSelfEntityIDResolver(net.shibboleth.shared.resolver.Resolver<String,net.shibboleth.shared.resolver.CriteriaSet> resolver)
    Set the resolver for the self entityID.
    void
    setSOAPClient(org.opensaml.soap.client.SOAPClient client)
    Set the SOAP client instance.
    void
    Set the SOAP client security configuration profile ID to use.
    void
    Set the name of the specific SOAP client message pipeline to use, for example with PipelineFactoryHttpSOAPClient.
    void
    setWebContext(org.pac4j.core.context.WebContext webContext)
     

    Methods inherited from class org.opensaml.messaging.decoder.AbstractMessageDecoder

    getMessageContext, setMessageContext

    Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

    checkComponentActive, checkSetterPreconditions, destroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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.shared.component.DestructableComponent

    destroy, isDestroyed

    Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

    initialize, isInitialized

    Methods inherited from interface org.opensaml.messaging.decoder.MessageDecoder

    getMessageContext
  • Constructor Details

    • Pac4jHTTPArtifactDecoder

      public Pac4jHTTPArtifactDecoder()
      Constructor.
  • Method Details

    • decode

      public void decode() throws org.opensaml.messaging.decoder.MessageDecodingException
      Specified by:
      decode in interface org.opensaml.messaging.decoder.MessageDecoder
      Overrides:
      decode in class org.opensaml.messaging.decoder.AbstractMessageDecoder
      Throws:
      org.opensaml.messaging.decoder.MessageDecodingException
    • doDestroy

      protected void doDestroy()
      Overrides:
      doDestroy in class org.opensaml.messaging.decoder.AbstractMessageDecoder
    • 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
    • getParserPool

      public net.shibboleth.shared.xml.ParserPool getParserPool()
      Gets the parser pool used to deserialize incoming messages.
      Returns:
      parser pool used to deserialize incoming messages
    • setParserPool

      public void setParserPool(net.shibboleth.shared.xml.ParserPool pool)
      Sets the parser pool used to deserialize incoming messages.
      Parameters:
      pool - parser pool used to deserialize incoming messages
    • doInitialize

      protected void doInitialize() throws net.shibboleth.shared.component.ComponentInitializationException
      Overrides:
      doInitialize in class net.shibboleth.shared.component.AbstractInitializableComponent
      Throws:
      net.shibboleth.shared.component.ComponentInitializationException
    • getIdentifierGenerationStrategy

      @NonnullAfterInit public net.shibboleth.shared.security.IdentifierGenerationStrategy getIdentifierGenerationStrategy()
      Get the identifier generation strategy.
      Returns:
      Returns the identifier generation strategy
    • setIdentifierGenerationStrategy

      public void setIdentifierGenerationStrategy(net.shibboleth.shared.security.IdentifierGenerationStrategy strategy)
      Set the identifier generation strategy.
      Parameters:
      strategy - the identifier generation strategy
    • getSelfEntityIDResolver

      @NonnullAfterInit public net.shibboleth.shared.resolver.Resolver<String,net.shibboleth.shared.resolver.CriteriaSet> getSelfEntityIDResolver()
      Get the resolver for the self entityID.
      Returns:
      the resolver
    • setSelfEntityIDResolver

      public void setSelfEntityIDResolver(net.shibboleth.shared.resolver.Resolver<String,net.shibboleth.shared.resolver.CriteriaSet> resolver)
      Set the resolver for the self entityID.
      Parameters:
      resolver - the resolver instance
    • getPeerEntityRole

      @NonnullAfterInit public QName getPeerEntityRole()
      Get the peer entity role QName.
      Returns:
      the peer entity role
    • setPeerEntityRole

      public void setPeerEntityRole(QName role)
      Set the peer entity role QName.
      Parameters:
      role - the peer entity role
    • getArtifactEndpointResolver

      @NonnullAfterInit public org.opensaml.saml.common.binding.EndpointResolver<org.opensaml.saml.saml2.metadata.ArtifactResolutionService> getArtifactEndpointResolver()
      Get the artifact endpoint resolver.
      Returns:
      the endpoint resolver
    • setArtifactEndpointResolver

      public void setArtifactEndpointResolver(org.opensaml.saml.common.binding.EndpointResolver<org.opensaml.saml.saml2.metadata.ArtifactResolutionService> resolver)
      Set the artifact endpoint resolver.
      Parameters:
      resolver - the new resolver
    • getRoleDescriptorResolver

      @NonnullAfterInit public org.opensaml.saml.metadata.resolver.RoleDescriptorResolver getRoleDescriptorResolver()
      Get the role descriptor resolver.

      Must be capable of resolving descriptors based on ArtifactCriterion.

      Returns:
      the role descriptor resolver
    • setRoleDescriptorResolver

      public void setRoleDescriptorResolver(org.opensaml.saml.metadata.resolver.RoleDescriptorResolver resolver)
      Set the role descriptor resolver.

      Must be capable of resolving descriptors based on ArtifactCriterion.

      Parameters:
      resolver - the role descriptor resolver
    • getArtifactBuilderFactory

      @NonnullAfterInit public org.opensaml.saml.saml2.binding.artifact.SAML2ArtifactBuilderFactory getArtifactBuilderFactory()
      Get the SAML 2 artifact builder factory.
      Returns:
      the artifact builder factory in use
    • setArtifactBuilderFactory

      public void setArtifactBuilderFactory(org.opensaml.saml.saml2.binding.artifact.SAML2ArtifactBuilderFactory factory)
      Set the SAML 2 artifact builder factory.
      Parameters:
      factory - the artifact builder factory
    • getSOAPClient

      @NonnullAfterInit public org.opensaml.soap.client.SOAPClient getSOAPClient()
      Get the SOAP client instance.
      Returns:
      the SOAP client
    • setSOAPClient

      public void setSOAPClient(org.opensaml.soap.client.SOAPClient client)
      Set the SOAP client instance.
      Parameters:
      client - the SOAP client
    • getSOAPPipelineName

      public String getSOAPPipelineName()
      Get the name of the specific SOAP client message pipeline to use, for example with PipelineFactoryHttpSOAPClient.
      Returns:
      the pipeline name, or null
    • setSOAPPipelineName

      public void setSOAPPipelineName(String name)
      Set the name of the specific SOAP client message pipeline to use, for example with PipelineFactoryHttpSOAPClient.
      Parameters:
      name - the pipeline name, or null
    • getSOAPClientSecurityConfigurationProfileId

      public String getSOAPClientSecurityConfigurationProfileId()
      Get the SOAP client security configuration profile ID to use.
      Returns:
      the client security configuration profile ID, or null
    • setSOAPClientSecurityConfigurationProfileId

      public void setSOAPClientSecurityConfigurationProfileId(String profileId)
      Set the SOAP client security configuration profile ID to use.
      Parameters:
      profileId - the profile ID, or null
    • getBindingURI

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

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

      public void setBindingDescriptor(org.opensaml.saml.common.binding.BindingDescriptor descriptor)
      Set an optional BindingDescriptor to inject into SAMLBindingContext created.
      Parameters:
      descriptor - a binding descriptor
    • 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
    • setWebContext

      public void setWebContext(org.pac4j.core.context.WebContext webContext)