opensaml-2.4.3
opensaml::SAMLConfig Class Referenceabstract

Singleton object that manages library startup/shutdown.configuration. More...

#include <saml/SAMLConfig.h>

Public Member Functions

virtual bool init (bool initXMLTooling=true)=0
 Initializes library. More...
 
virtual void term (bool termXMLTooling=true)=0
 Shuts down library. More...
 
void setArtifactMap (ArtifactMap *artifactMap)
 Sets the global ArtifactMap instance. More...
 
ArtifactMapgetArtifactMap () const
 Returns the global ArtifactMap instance. More...
 
virtual void generateRandomBytes (void *buf, unsigned int len)=0
 Generate random information using the underlying security library. More...
 
virtual void generateRandomBytes (std::string &buf, unsigned int len)=0
 Generate random information using the underlying security library. More...
 
virtual XMLCh * generateIdentifier ()=0
 Generate a valid XML identifier of the form _X{32} where X is a random hex character. More...
 
virtual std::string hashSHA1 (const char *s, bool toHex=false)=0
 

Static Public Member Functions

static SAMLConfiggetConfig ()
 Returns the global configuration object for the library. More...
 

Public Attributes

xmltooling::PluginManager
< MessageDecoder, std::string,
std::pair< const
xercesc::DOMElement *, const
XMLCh * > > 
MessageDecoderManager
 Manages factories for MessageDecoder plugins. More...
 
xmltooling::PluginManager
< MessageEncoder, std::string,
std::pair< const
xercesc::DOMElement *, const
XMLCh * > > 
MessageEncoderManager
 Manages factories for MessageEncoder plugins. More...
 
xmltooling::PluginManager
< SAMLArtifact, std::string,
const char * > 
SAMLArtifactManager
 Manages factories for SAMLArtifact plugins. More...
 
xmltooling::PluginManager
< SecurityPolicyRule,
std::string, const
xercesc::DOMElement * > 
SecurityPolicyRuleManager
 Manages factories for SecurityPolicyRule plugins. More...
 
xmltooling::PluginManager
< saml2md::MetadataProvider,
std::string, const
xercesc::DOMElement * > 
MetadataProviderManager
 Manages factories for MetadataProvider plugins. More...
 
xmltooling::PluginManager
< saml2md::MetadataFilter,
std::string, const
xercesc::DOMElement * > 
MetadataFilterManager
 Manages factories for MetadataFilter plugins. More...
 

Protected Attributes

ArtifactMapm_artifactMap
 Global ArtifactMap instance for use by artifact-related functions. More...
 

Detailed Description

Singleton object that manages library startup/shutdown.configuration.

Member Function Documentation

virtual XMLCh* opensaml::SAMLConfig::generateIdentifier ( )
pure virtual

Generate a valid XML identifier of the form _X{32} where X is a random hex character.

The caller is responsible for freeing the result.

Returns
a valid null-terminated XML ID
virtual void opensaml::SAMLConfig::generateRandomBytes ( void *  buf,
unsigned int  len 
)
pure virtual

Generate random information using the underlying security library.

Parameters
bufbuffer for the information
lennumber of bytes to write into buffer
virtual void opensaml::SAMLConfig::generateRandomBytes ( std::string &  buf,
unsigned int  len 
)
pure virtual

Generate random information using the underlying security library.

Parameters
bufstring buffer for the information
lennumber of bytes to write into buffer
ArtifactMap* opensaml::SAMLConfig::getArtifactMap ( ) const

Returns the global ArtifactMap instance.

Returns
global ArtifactMap or nullptr
static SAMLConfig& opensaml::SAMLConfig::getConfig ( )
static

Returns the global configuration object for the library.

Returns
reference to the global library configuration object
virtual std::string opensaml::SAMLConfig::hashSHA1 ( const char *  s,
bool  toHex = false 
)
pure virtual
Deprecated:
Generate the SHA-1 hash of a string
Parameters
sNULL-terminated string to hash
toHextrue iff the result should be encoded in hexadecimal form or left as raw bytes
Returns
SHA-1 hash of the data
virtual bool opensaml::SAMLConfig::init ( bool  initXMLTooling = true)
pure virtual

Initializes library.

Each process using the library MUST call this function exactly once before using any library classes. The flag controls whether this is the "dominant" library or not and can allow the SAML library to be loaded as an extension of XMLTooling rather than subsuming it.

Parameters
initXMLToolingtrue iff this method should initialize the XMLTooling layer
Returns
true iff initialization was successful
void opensaml::SAMLConfig::setArtifactMap ( ArtifactMap artifactMap)

Sets the global ArtifactMap instance.

This method must be externally synchronized with any code that uses the object. Any previously set object is destroyed.

Parameters
artifactMapnew ArtifactMap instance to store
virtual void opensaml::SAMLConfig::term ( bool  termXMLTooling = true)
pure virtual

Shuts down library.

Each process using the library SHOULD call this function exactly once before terminating itself. The flag controls whether this is the "dominant" library or not and can allow the SAML library to be loaded as an extension of XMLTooling rather than subsuming it.

Parameters
termXMLToolingtrue iff this method should shutdown the XMLTooling layer

Member Data Documentation

ArtifactMap* opensaml::SAMLConfig::m_artifactMap
protected

Global ArtifactMap instance for use by artifact-related functions.

xmltooling::PluginManager< MessageDecoder,std::string,std::pair<const xercesc::DOMElement*,const XMLCh*> > opensaml::SAMLConfig::MessageDecoderManager

Manages factories for MessageDecoder plugins.

xmltooling::PluginManager< MessageEncoder,std::string,std::pair<const xercesc::DOMElement*,const XMLCh*> > opensaml::SAMLConfig::MessageEncoderManager

Manages factories for MessageEncoder plugins.

xmltooling::PluginManager<saml2md::MetadataFilter,std::string,const xercesc::DOMElement*> opensaml::SAMLConfig::MetadataFilterManager

Manages factories for MetadataFilter plugins.

xmltooling::PluginManager<saml2md::MetadataProvider,std::string,const xercesc::DOMElement*> opensaml::SAMLConfig::MetadataProviderManager

Manages factories for MetadataProvider plugins.

xmltooling::PluginManager<SAMLArtifact,std::string,const char*> opensaml::SAMLConfig::SAMLArtifactManager

Manages factories for SAMLArtifact plugins.

xmltooling::PluginManager<SecurityPolicyRule,std::string,const xercesc::DOMElement*> opensaml::SAMLConfig::SecurityPolicyRuleManager

Manages factories for SecurityPolicyRule plugins.


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