shibsp::SPConfig Class Reference

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

`#include <shibsp/SPConfig.h>`

Collaboration diagram for shibsp::SPConfig:
[legend]

## 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.
unsigned long | getFeatures () const
| Gets the bitmask of subsystems being activated.
bool | isEnabled (components_t feature) const
| Test whether a subsystem is enabled.
virtual bool | init (const char *catalog_path=nullptr, const char *inst_prefix=nullptr)
| Initializes library.
virtual void | term ()
| Shuts down library.
void | setServiceProvider (ServiceProvider *serviceProvider)
| Sets the global ServiceProvider instance.
ServiceProvider * | getServiceProvider () const
| Returns the global ServiceProvider instance.
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.
void | setArtifactResolver (opensaml::MessageDecoder::ArtifactResolver *artifactResolver)
| Sets the global ArtifactResolver instance.
const opensaml::MessageDecoder::ArtifactResolver * | getArtifactResolver () const
| Returns the global ArtifactResolver instance.
xmltooling::logging::Category & | deprecation () const
| Helper for deprecation warnings about an at-risk feature or setting.

## Static Public Member Functions

static SPConfig & | getConfig ()
| Returns the global configuration object for the library.
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.

## 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

ServiceProvider * | m_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()

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_path | delimited set of schema catalog files to load
  inst_prefix | installation 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

  config | a snippet of XML to parse (it MUST contain a type attribute) or a pathname
  rethrow | true 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

  feature | subsystem/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

  artifactResolver | new ArtifactResolver instance to store

## setFeatures()

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

Set a bitmask of subsystems to activate.

Parameters

  enabled | bitmask 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

  serviceProvider | new ServiceProvider instance to store

## shouldSignOrEncrypt()

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

  setting | the applicable "signing" or "encryption" property in effect
  isUserAgentPresent | true iff the user agent is mediating the exchange
  URL | of 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.

## Member Data Documentation

## attribute_value_delimeter

char shibsp::SPConfig::attribute_value_delimeter

Separator for serialized values of multi-valued attributes.

This is deprecated, and was never actually read within the code.

Deprecated

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

- shibsp/SPConfig.h