Class StorageServiceSAMLArtifactMap
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.saml.common.binding.artifact.impl.StorageServiceSAMLArtifactMap
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,SAMLArtifactMap
public class StorageServiceSAMLArtifactMap
extends AbstractInitializableComponent
implements SAMLArtifactMap
Artifact map implementation backed by
StorageService.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensaml.saml.common.binding.artifact.SAMLArtifactMap
SAMLArtifactMap.SAMLArtifactMapEntry, SAMLArtifactMap.SAMLArtifactMapEntryFactory -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DurationLifetime of an artifact.private StorageServiceArtifact mapping storage.private intMaximum size of artifacts we can handle.Factory for SAMLArtifactMapEntry instances.private final org.slf4j.LoggerClass Logger.static final StringStorage context label. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected voidGet the artifact entry lifetime.Get the map entry factory.Get the artifact store.voidput(String artifact, String relyingPartyId, String issuerId, SAMLObject samlMessage) voidvoidsetArtifactLifetime(Duration lifetime) Set the artifact entry lifetime.voidSet the map entry factory.voidsetStorageService(StorageService store) Set the artifact store.Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Field Details
-
STORAGE_CONTEXT
Storage context label. -
log
@Nonnull private final org.slf4j.Logger logClass Logger. -
artifactStore
Artifact mapping storage. -
artifactStoreKeySize
private int artifactStoreKeySizeMaximum size of artifacts we can handle. -
artifactLifetime
Lifetime of an artifact. -
entryFactory
Factory for SAMLArtifactMapEntry instances.
-
-
Constructor Details
-
StorageServiceSAMLArtifactMap
public StorageServiceSAMLArtifactMap()Constructor.
-
-
Method Details
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
getStorageService
Get the artifact store.- Returns:
- the artifact store
-
getArtifactLifetime
Get the artifact entry lifetime.- Returns:
- the artifact entry lifetime
-
getEntryFactory
Get the map entry factory.- Returns:
- the map entry factory
-
setStorageService
Set the artifact store.- Parameters:
store- the artifact store
-
setArtifactLifetime
Set the artifact entry lifetime.- Parameters:
lifetime- artifact entry lifetime
-
setEntryFactory
Set the map entry factory.In addition to implementing the
SAMLArtifactMap.SAMLArtifactMapEntryFactoryinterface, the injected object must support theStorageSerializerinterface to enable entries to be stored via the injectedStorageServiceinstance.- Parameters:
factory- map entry factory
-
contains
- Specified by:
containsin interfaceSAMLArtifactMap- Throws:
IOException
-
get
@Nullable public SAMLArtifactMap.SAMLArtifactMapEntry get(@Nonnull @NotEmpty String artifact) throws IOException - Specified by:
getin interfaceSAMLArtifactMap- Throws:
IOException
-
put
public void put(@Nonnull @NotEmpty String artifact, @Nonnull @NotEmpty String relyingPartyId, @Nonnull @NotEmpty String issuerId, @Nonnull SAMLObject samlMessage) throws IOException - Specified by:
putin interfaceSAMLArtifactMap- Throws:
IOException
-
remove
- Specified by:
removein interfaceSAMLArtifactMap- Throws:
IOException
-