Class ResolveArtifact

  • All Implemented Interfaces:
    net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.InitializableComponent, org.opensaml.profile.action.ProfileAction

    public class ResolveArtifact
    extends org.opensaml.profile.action.AbstractProfileAction
    Action that resolves a SAML 2.0 artifact inside an ArtifactResolve request located via a lookup strategy, by default from the inbound message context, and maps it to the corresponding message.

    The message is added to an ArtifactResponse located via a lookup strategy, by default from the outbound message context.

    Event:
    EventIds.PROCEED_EVENT_ID, EventIds.INVALID_MSG_CTX, EventIds.INVALID_PROFILE_CTX, SAMLEventIds.UNABLE_RESOLVE_ARTIFACT
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.opensaml.saml.common.binding.artifact.SAMLArtifactMap artifactMap
      Artifact mapper.
      private String issuerId
      Identity of issuer.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​String> issuerLookupStrategy
      Strategy used to locate the issuer identity to validate against artifact entries.
      private Logger log
      Class logger.
      private org.opensaml.saml.saml2.core.ArtifactResolve request
      Request to process.
      private String requesterId
      Identity of requester.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​String> requesterLookupStrategy
      Strategy used to locate the requester identity to validate against artifact entries.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.saml2.core.ArtifactResolve> requestLookupStrategy
      Strategy used to locate the ArtifactResolve to operate on.
      private org.opensaml.saml.saml2.core.ArtifactResponse response
      Response to populate.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.saml2.core.ArtifactResponse> responseLookupStrategy
      Strategy used to locate the ArtifactResponse to operate on.
    • Constructor Summary

      Constructors 
      Constructor Description
      ResolveArtifact()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doExecute​(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
      protected void doInitialize()
      protected boolean doPreExecute​(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
      void setArtifactMap​(org.opensaml.saml.common.binding.artifact.SAMLArtifactMap map)
      Set the artifact map to use.
      void setIssuerLookupStrategy​(Function<org.opensaml.profile.context.ProfileRequestContext,​String> strategy)
      Set the strategy used to locate the issuer's identity.
      void setRequesterLookupStrategy​(Function<org.opensaml.profile.context.ProfileRequestContext,​String> strategy)
      Set the strategy used to locate the requester's identity.
      void setRequestLookupStrategy​(Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.saml2.core.ArtifactResolve> strategy)
      Set the strategy used to locate the ArtifactResolve to operate on.
      void setResponseLookupStrategy​(Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.saml2.core.ArtifactResponse> strategy)
      Set the strategy used to locate the ArtifactResponse to operate on.
      • Methods inherited from class org.opensaml.profile.action.AbstractProfileAction

        doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
      • Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent

        destroy, doDestroy, initialize, isDestroyed, isInitialized
      • Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent

        initialize, isInitialized
    • Field Detail

      • log

        @Nonnull
        private Logger log
        Class logger.
      • requestLookupStrategy

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.saml2.core.ArtifactResolve> requestLookupStrategy
        Strategy used to locate the ArtifactResolve to operate on.
      • responseLookupStrategy

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.saml2.core.ArtifactResponse> responseLookupStrategy
        Strategy used to locate the ArtifactResponse to operate on.
      • issuerLookupStrategy

        @NonnullAfterInit
        private Function<org.opensaml.profile.context.ProfileRequestContext,​String> issuerLookupStrategy
        Strategy used to locate the issuer identity to validate against artifact entries.
      • requesterLookupStrategy

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​String> requesterLookupStrategy
        Strategy used to locate the requester identity to validate against artifact entries.
      • artifactMap

        @NonnullAfterInit
        private org.opensaml.saml.common.binding.artifact.SAMLArtifactMap artifactMap
        Artifact mapper.
      • request

        @Nullable
        private org.opensaml.saml.saml2.core.ArtifactResolve request
        Request to process.
      • response

        @Nullable
        private org.opensaml.saml.saml2.core.ArtifactResponse response
        Response to populate.
      • issuerId

        @Nullable
        private String issuerId
        Identity of issuer.
      • requesterId

        @Nullable
        private String requesterId
        Identity of requester.
    • Constructor Detail

      • ResolveArtifact

        public ResolveArtifact()
        Constructor.
    • Method Detail

      • setRequestLookupStrategy

        public void setRequestLookupStrategy​(@Nonnull
                                             Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.saml2.core.ArtifactResolve> strategy)
        Set the strategy used to locate the ArtifactResolve to operate on.
        Parameters:
        strategy - lookup strategy
      • setResponseLookupStrategy

        public void setResponseLookupStrategy​(@Nonnull
                                              Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.saml2.core.ArtifactResponse> strategy)
        Set the strategy used to locate the ArtifactResponse to operate on.
        Parameters:
        strategy - lookup strategy
      • setIssuerLookupStrategy

        public void setIssuerLookupStrategy​(@Nonnull
                                            Function<org.opensaml.profile.context.ProfileRequestContext,​String> strategy)
        Set the strategy used to locate the issuer's identity.
        Parameters:
        strategy - lookup strategy
      • setRequesterLookupStrategy

        public void setRequesterLookupStrategy​(@Nonnull
                                               Function<org.opensaml.profile.context.ProfileRequestContext,​String> strategy)
        Set the strategy used to locate the requester's identity.
        Parameters:
        strategy - lookup strategy
      • setArtifactMap

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

        protected void doInitialize()
                             throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
        Overrides:
        doInitialize in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
        Throws:
        net.shibboleth.utilities.java.support.component.ComponentInitializationException
      • doPreExecute

        protected boolean doPreExecute​(@Nonnull
                                       org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
        Overrides:
        doPreExecute in class org.opensaml.profile.action.AbstractProfileAction
      • doExecute

        protected void doExecute​(@Nonnull
                                 org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
        Overrides:
        doExecute in class org.opensaml.profile.action.AbstractProfileAction