shibboleth-3.0.4
shibsp::SPConfig Class Reference

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

#include <shibsp/SPConfig.h>

Collaboration diagram for shibsp::SPConfig:

Public Types

enum  components_t {
  Listener = 1, Caching = 2, Metadata = 4, Trust = 8,
  Credentials = 16, AttributeResolution = 32, RequestMapping = 64, OutOfProcess = 128,
  InProcess = 256, Logging = 512, Handlers = 1024
}
 Bitmask values representing subsystems of the library.
 

Public Member Functions

void setFeatures (unsigned long enabled)
 Set a bitmask of subsystems to activate. More...
 
unsigned long getFeatures () const
 Gets the bitmask of subsystems being activated. More...
 
bool isEnabled (components_t feature) const
 Test whether a subsystem is enabled. More...
 
virtual bool init (const char *catalog_path=nullptr, const char *inst_prefix=nullptr)
 Initializes library. More...
 
virtual void term ()
 Shuts down library. More...
 
void setServiceProvider (ServiceProvider *serviceProvider)
 Sets the global ServiceProvider instance. More...
 
ServiceProvidergetServiceProvider () const
 Returns the global ServiceProvider instance. More...
 
virtual bool instantiate (const char *config=nullptr, bool rethrow=false)
 Instantiates and installs a ServiceProvider instance based on an XML configuration string or a configuration pathname. More...
 
void setArtifactResolver (opensaml::MessageDecoder::ArtifactResolver *artifactResolver)
 Sets the global ArtifactResolver instance. More...
 
const opensaml::MessageDecoder::ArtifactResolver * getArtifactResolver () const
 Returns the global ArtifactResolver instance. More...
 

Static Public Member Functions

static SPConfiggetConfig ()
 Returns the global configuration object for the library. More...
 
static bool shouldSignOrEncrypt (const char *setting, const char *endpoint, bool isUserAgentPresent)
 Determine whether messages should be digitally signed or encrypted based on the setting and endpoint. More...
 

Public Attributes

char attribute_value_delimeter
 Separator for serialized values of multi-valued attributes.
 
xmltooling::PluginManager< AccessControl, std::string, const xercesc::DOMElement * > AccessControlManager
 Manages factories for AccessControl plugins.
 
xmltooling::PluginManager< AttributeDecoder, xmltooling::QName, const xercesc::DOMElement * > AttributeDecoderManager
 Manages factories for AttributeDecoder plugins.
 
xmltooling::PluginManager< AttributeExtractor, std::string, const xercesc::DOMElement * > AttributeExtractorManager
 Manages factories for AttributeExtractor plugins.
 
xmltooling::PluginManager< AttributeFilter, std::string, const xercesc::DOMElement * > AttributeFilterManager
 Manages factories for AttributeFilter plugins.
 
xmltooling::PluginManager< AttributeResolver, std::string, const xercesc::DOMElement * > AttributeResolverManager
 Manages factories for AttributeResolver plugins.
 
xmltooling::PluginManager< TransactionLog::Event, std::string, void * > EventManager
 Manages factories for Event plugins.
 
xmltooling::PluginManager< MatchFunctor, xmltooling::QName, std::pair< const FilterPolicyContext *, const xercesc::DOMElement * > > MatchFunctorManager
 Manages factories for MatchFunctor plugins.
 
xmltooling::PluginManager< SecurityPolicyProvider, std::string, const xercesc::DOMElement * > SecurityPolicyProviderManager
 Manages factories for SecurityPolicyProvider plugins.
 
xmltooling::PluginManager< Handler, std::string, std::pair< const xercesc::DOMElement *, const char * > > ArtifactResolutionServiceManager
 Manages factories for Handler plugins that implement ArtifactResolutionService functionality.
 
xmltooling::PluginManager< Handler, std::string, std::pair< const xercesc::DOMElement *, const char * > > AssertionConsumerServiceManager
 Manages factories for Handler plugins that implement AssertionConsumerService functionality.
 
xmltooling::PluginManager< Handler, std::string, std::pair< const xercesc::DOMElement *, const char * > > HandlerManager
 Manages factories for Handler plugins that implement customized functionality.
 
xmltooling::PluginManager< ListenerService, std::string, const xercesc::DOMElement * > ListenerServiceManager
 Manages factories for ListenerService plugins.
 
xmltooling::PluginManager< Handler, std::string, std::pair< const xercesc::DOMElement *, const char * > > LogoutInitiatorManager
 Manages factories for Handler plugins that implement LogoutInitiator functionality.
 
xmltooling::PluginManager< Handler, std::string, std::pair< const xercesc::DOMElement *, const char * > > ManageNameIDServiceManager
 Manages factories for Handler plugins that implement ManageNameIDService functionality.
 
xmltooling::PluginManager< ProtocolProvider, std::string, const xercesc::DOMElement * > ProtocolProviderManager
 Manages factories for ProtocolProvider plugins.
 
xmltooling::PluginManager< RequestMapper, std::string, const xercesc::DOMElement * > RequestMapperManager
 Manages factories for RequestMapper plugins.
 
xmltooling::PluginManager< ServiceProvider, std::string, const xercesc::DOMElement * > ServiceProviderManager
 Manages factories for ServiceProvider plugins.
 
xmltooling::PluginManager< SessionCache, std::string, const xercesc::DOMElement * > SessionCacheManager
 Manages factories for SessionCache plugins.
 
xmltooling::PluginManager< SessionInitiator, std::string, std::pair< const xercesc::DOMElement *, const char * > > SessionInitiatorManager
 Manages factories for Handler plugins that implement SessionInitiator functionality.
 
xmltooling::PluginManager< Handler, std::string, std::pair< const xercesc::DOMElement *, const char * > > SingleLogoutServiceManager
 Manages factories for Handler plugins that implement SingleLogoutService functionality.
 

Protected Attributes

ServiceProviderm_serviceProvider
 Global ServiceProvider instance.
 
opensaml::MessageDecoder::ArtifactResolver * m_artifactResolver
 Global ArtifactResolver instance.
 

Detailed Description

Singleton object that manages library startup/shutdown.

Member Function Documentation

◆ getArtifactResolver()

const opensaml::MessageDecoder::ArtifactResolver* shibsp::SPConfig::getArtifactResolver ( ) const

Returns the global ArtifactResolver instance.

Returns
global ArtifactResolver or nullptr

◆ getConfig()

static SPConfig& shibsp::SPConfig::getConfig ( )
static

Returns the global configuration object for the library.

Returns
reference to the global library configuration object

◆ getFeatures()

unsigned long shibsp::SPConfig::getFeatures ( ) const

Gets the bitmask of subsystems being activated.

Returns
bitmask of component constants

◆ getServiceProvider()

ServiceProvider* shibsp::SPConfig::getServiceProvider ( ) const

Returns the global ServiceProvider instance.

Returns
global ServiceProvider or nullptr

◆ init()

virtual bool shibsp::SPConfig::init ( const char *  catalog_path = nullptr,
const char *  inst_prefix = nullptr 
)
virtual

Initializes library.

Each process using the library MUST call this function exactly once before using any library classes.

Parameters
catalog_pathdelimited set of schema catalog files to load
inst_prefixinstallation prefix for software
Returns
true iff initialization was successful

◆ instantiate()

virtual bool shibsp::SPConfig::instantiate ( const char *  config = nullptr,
bool  rethrow = false 
)
virtual

Instantiates and installs a ServiceProvider instance based on an XML configuration string or a configuration pathname.

Parameters
configa snippet of XML to parse (it MUST contain a type attribute) or a pathname
rethrowtrue iff caught exceptions should be rethrown instead of just returning the status
Returns
true iff instantiation was successful

◆ isEnabled()

bool shibsp::SPConfig::isEnabled ( components_t  feature) const

Test whether a subsystem is enabled.

Parameters
featuresubsystem/component to test
Returns
true iff feature is enabled

◆ setArtifactResolver()

void shibsp::SPConfig::setArtifactResolver ( opensaml::MessageDecoder::ArtifactResolver *  artifactResolver)

Sets the global ArtifactResolver instance.

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

Parameters
artifactResolvernew ArtifactResolver instance to store

◆ setFeatures()

void shibsp::SPConfig::setFeatures ( unsigned long  enabled)

Set a bitmask of subsystems to activate.

Parameters
enabledbitmask of component constants

◆ setServiceProvider()

void shibsp::SPConfig::setServiceProvider ( ServiceProvider serviceProvider)

Sets the global ServiceProvider instance.

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

Parameters
serviceProvidernew ServiceProvider instance to store

◆ shouldSignOrEncrypt()

static bool shibsp::SPConfig::shouldSignOrEncrypt ( const char *  setting,
const char *  endpoint,
bool  isUserAgentPresent 
)
static

Determine whether messages should be digitally signed or encrypted based on the setting and endpoint.

Parameters
settingthe applicable "signing" or "encryption" property in effect
isUserAgentPresenttrue iff the user agent is mediating the exchange
URLof endpoint to receive message
Returns
whether requests should be digitally signed or encrypted

◆ term()

virtual void shibsp::SPConfig::term ( )
virtual

Shuts down library.

Each process using the library SHOULD call this function exactly once before terminating itself.


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