Interface SAMLArtifactMap
-
public interface SAMLArtifactMapMaps an artifact to a SAML message and back again.An implementation of this interface MUST ensure that the persisted SAML message is no longer tied to any parent
XMLObjectthat may have contained it. This ensures that it can be safely added to another object once retrieved from the map. This might for example be achieved by: 1) cloning the SAMLObject prior to storage, or 2) by serializing it to a string and re-parsing and unmarshalling it once retrieved from the underlying data store. This requirement may be handled by the SAMLArtifactMap directly, or by the use of of a specific implementation ofSAMLArtifactMap.SAMLArtifactMapEntryFactory.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSAMLArtifactMap.SAMLArtifactMapEntryRepresents a mapping between an artifact and a SAML message with some associated information.static interfaceSAMLArtifactMap.SAMLArtifactMapEntryFactoryA factory for producing SAMLArtifactMapEntry instances based on standard inputs, and reading/writing them from/to storage.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontains(String artifact)Checks if a given artifact has a map entry.SAMLArtifactMap.SAMLArtifactMapEntryget(String artifact)Gets the artifact entry for the given artifact.voidput(String artifact, String relyingPartyId, String issuerId, SAMLObject samlMessage)Creates a mapping between a given artifact and the SAML message to which it maps.voidremove(String artifact)Removes the artifact from this map.
-
-
-
Method Detail
-
contains
boolean contains(@Nonnull @NotEmpty String artifact) throws IOException
Checks if a given artifact has a map entry.- Parameters:
artifact- the artifact to check- Returns:
- true iff this map has an entry for the given artifact
- Throws:
IOException- if an error occurs retrieving the information
-
put
void put(@Nonnull @NotEmpty String artifact, @Nonnull @NotEmpty String relyingPartyId, @Nonnull @NotEmpty String issuerId, @Nonnull SAMLObject samlMessage) throws IOException
Creates a mapping between a given artifact and the SAML message to which it maps.- Parameters:
artifact- the artifactrelyingPartyId- ID of the party the artifact was sent toissuerId- ID of the issuer of the artifactsamlMessage- the SAML message- Throws:
IOException- if an error occurs storing the information
-
get
@Nullable SAMLArtifactMap.SAMLArtifactMapEntry get(@Nonnull @NotEmpty String artifact) throws IOException
Gets the artifact entry for the given artifact.- Parameters:
artifact- the artifact to retrieve the entry for- Returns:
- the entry, or null if the artifact has already expired or did not exist
- Throws:
IOException- if an error occurs retrieving the information
-
remove
void remove(@Nonnull @NotEmpty String artifact) throws IOException
Removes the artifact from this map.- Parameters:
artifact- artifact to be removed- Throws:
IOException- if an error occurs retrieving the information
-
-