opensaml-3.2.1
opensaml::ArtifactMap Class Reference

Helper class for SAMLArtifact mapping and retrieval. More...

#include <saml/binding/ArtifactMap.h>

Public Member Functions

 ArtifactMap (xmltooling::StorageService *storage=0, const char *context=0, unsigned int artifactTTL=180)
 Creates a map on top of a particular storage service context, or in-memory. More...
 
 ArtifactMap (const xercesc::DOMElement *e, xmltooling::StorageService *storage=0)
 Creates a map on top of a particular storage service context, or in-memory. More...
 
virtual void storeContent (xmltooling::XMLObject *content, const SAMLArtifact *artifact, const char *relyingParty=0)
 Associates XML content with an artifact and optionally a specific relying party. More...
 
virtual xmltooling::XMLObject * retrieveContent (const SAMLArtifact *artifact, const char *relyingParty=0)
 Retrieves the XML content represented by the artifact. More...
 
virtual std::string getRelyingParty (const SAMLArtifact *artifact)
 Retrieves the relying party to whom the artifact was issued. More...
 

Detailed Description

Helper class for SAMLArtifact mapping and retrieval.

Constructor & Destructor Documentation

◆ ArtifactMap() [1/2]

opensaml::ArtifactMap::ArtifactMap ( xmltooling::StorageService *  storage = 0,
const char *  context = 0,
unsigned int  artifactTTL = 180 
)

Creates a map on top of a particular storage service context, or in-memory.

Parameters
storagepointer to a StorageService, or nullptr to keep map in memory
contextoptional label for storage context
artifactTTLtime to live in seconds, determines how long artifact remains valid

◆ ArtifactMap() [2/2]

opensaml::ArtifactMap::ArtifactMap ( const xercesc::DOMElement *  e,
xmltooling::StorageService *  storage = 0 
)

Creates a map on top of a particular storage service context, or in-memory.

Parameters
eroot of a DOM with optional XML attributes for context and artifactTTL
storagepointer to a StorageService, or nullptr to keep map in memory

Member Function Documentation

◆ getRelyingParty()

virtual std::string opensaml::ArtifactMap::getRelyingParty ( const SAMLArtifact artifact)
virtual

Retrieves the relying party to whom the artifact was issued.

Parameters
artifactthe artifact to check
Returns
entityID of the party to whom the artifact was issued, if any

◆ retrieveContent()

virtual xmltooling::XMLObject* opensaml::ArtifactMap::retrieveContent ( const SAMLArtifact artifact,
const char *  relyingParty = 0 
)
virtual

Retrieves the XML content represented by the artifact.

The identity of the relying party can be supplied, if known. If the wrong party tries to resolve an artifact, an exception will be thrown and the mapping will be removed. The caller is responsible for freeing the XML content returned.

Parameters
artifactthe artifact representing the XML content
relyingPartyentityID of the party trying to resolve the artifact
Returns
the XML content

◆ storeContent()

virtual void opensaml::ArtifactMap::storeContent ( xmltooling::XMLObject *  content,
const SAMLArtifact artifact,
const char *  relyingParty = 0 
)
virtual

Associates XML content with an artifact and optionally a specific relying party.

Specifying no relying party means that the first attempt to resolve the artifact will succeed. The XML content cannot have a parent object, and any existing references to the content will be invalidated.

Parameters
contentthe XML content to map to an artifact
artifactthe artifact representing the XML content
relyingPartyentityID of the party authorized to resolve the artifact
Returns
the generated artifact

The documentation for this class was generated from the following file: