Class StorageServiceSAMLArtifactMap

  • 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.saml.common.binding.artifact.SAMLArtifactMap

    public class StorageServiceSAMLArtifactMap
    extends net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
    implements org.opensaml.saml.common.binding.artifact.SAMLArtifactMap
    Artifact map implementation backed by StorageService.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.opensaml.saml.common.binding.artifact.SAMLArtifactMap

        org.opensaml.saml.common.binding.artifact.SAMLArtifactMap.SAMLArtifactMapEntry, org.opensaml.saml.common.binding.artifact.SAMLArtifactMap.SAMLArtifactMapEntryFactory
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Duration artifactLifetime
      Lifetime of an artifact.
      private org.opensaml.storage.StorageService artifactStore
      Artifact mapping storage.
      private int artifactStoreKeySize
      Maximum size of artifacts we can handle.
      private org.opensaml.saml.common.binding.artifact.SAMLArtifactMap.SAMLArtifactMapEntryFactory entryFactory
      Factory for SAMLArtifactMapEntry instances.
      private org.slf4j.Logger log
      Class Logger.
      static String STORAGE_CONTEXT
      Storage context label.
    • Field Detail

      • STORAGE_CONTEXT

        @Nonnull
        @NotEmpty
        public static final String STORAGE_CONTEXT
        Storage context label.
      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class Logger.
      • artifactStore

        @NonnullAfterInit
        private org.opensaml.storage.StorageService artifactStore
        Artifact mapping storage.
      • artifactStoreKeySize

        private int artifactStoreKeySize
        Maximum size of artifacts we can handle.
      • artifactLifetime

        @Nonnull
        private Duration artifactLifetime
        Lifetime of an artifact.
      • entryFactory

        @Nonnull
        private org.opensaml.saml.common.binding.artifact.SAMLArtifactMap.SAMLArtifactMapEntryFactory entryFactory
        Factory for SAMLArtifactMapEntry instances.
    • Constructor Detail

      • StorageServiceSAMLArtifactMap

        public StorageServiceSAMLArtifactMap()
        Constructor.
    • Method Detail

      • 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
      • getStorageService

        @NonnullAfterInit
        public org.opensaml.storage.StorageService getStorageService()
        Get the artifact store.
        Returns:
        the artifact store
      • getArtifactLifetime

        @Nonnull
        public Duration getArtifactLifetime()
        Get the artifact entry lifetime.
        Returns:
        the artifact entry lifetime
      • getEntryFactory

        @Nonnull
        public org.opensaml.saml.common.binding.artifact.SAMLArtifactMap.SAMLArtifactMapEntryFactory getEntryFactory()
        Get the map entry factory.
        Returns:
        the map entry factory
      • setStorageService

        public void setStorageService​(@Nonnull
                                      org.opensaml.storage.StorageService store)
        Set the artifact store.
        Parameters:
        store - the artifact store
      • setArtifactLifetime

        public void setArtifactLifetime​(@Nonnull
                                        Duration lifetime)
        Set the artifact entry lifetime.
        Parameters:
        lifetime - artifact entry lifetime
      • setEntryFactory

        public void setEntryFactory​(@Nonnull
                                    org.opensaml.saml.common.binding.artifact.SAMLArtifactMap.SAMLArtifactMapEntryFactory factory)
        Set the map entry factory.

        In addition to implementing the SAMLArtifactMap.SAMLArtifactMapEntryFactory interface, the injected object must support the StorageSerializer interface to enable entries to be stored via the injected StorageService instance.

        Parameters:
        factory - map entry factory
      • contains

        public boolean contains​(@Nonnull @NotEmpty
                                String artifact)
                         throws IOException
        Specified by:
        contains in interface org.opensaml.saml.common.binding.artifact.SAMLArtifactMap
        Throws:
        IOException
      • get

        @Nullable
        public org.opensaml.saml.common.binding.artifact.SAMLArtifactMap.SAMLArtifactMapEntry get​(@Nonnull @NotEmpty
                                                                                                  String artifact)
                                                                                           throws IOException
        Specified by:
        get in interface org.opensaml.saml.common.binding.artifact.SAMLArtifactMap
        Throws:
        IOException
      • put

        public void put​(@Nonnull @NotEmpty
                        String artifact,
                        @Nonnull @NotEmpty
                        String relyingPartyId,
                        @Nonnull @NotEmpty
                        String issuerId,
                        @Nonnull
                        org.opensaml.saml.common.SAMLObject samlMessage)
                 throws IOException
        Specified by:
        put in interface org.opensaml.saml.common.binding.artifact.SAMLArtifactMap
        Throws:
        IOException
      • remove

        public void remove​(@Nonnull @NotEmpty
                           String artifact)
                    throws IOException
        Specified by:
        remove in interface org.opensaml.saml.common.binding.artifact.SAMLArtifactMap
        Throws:
        IOException