shibboleth-3.5.0

Public Member Functions | Protected Member Functions | Friends | List of all members
shibsp::XMLConfig Class Reference
Inheritance diagram for shibsp::XMLConfig:

## Public Member Functions
| XMLConfig (const xercesc::DOMElement *e, bool deprecationSupport=true)
void | init ()
| Loads a configuration and prepares the instance for use. More...
const XMLCh * | getConfigurationNamespace () const
| Get the "active" XML namespace of the underlying configuration. More...
xmltooling::Lockable * | lock ()
void | unlock ()
const PropertySet * | getParent () const
| Returns parent of this PropertySet, if any. More...
void | setParent (const PropertySet *parent)
| Establishes a "parent" PropertySet to supply inherited settings. More...
std::pair< bool, bool > | getBool (const char *name, const char *ns=nullptr) const
| Returns a boolean-valued property. More...
std::pair< bool, const char * > | getString (const char *name, const char *ns=nullptr) const
| Returns a string-valued property. More...
std::pair< bool, const XMLCh * > | getXMLString (const char *name, const char *ns=nullptr) const
| Returns a Unicode string-valued property. More...
std::pair< bool, unsigned int > | getUnsignedInt (const char *name, const char *ns=nullptr) const
| Returns an unsigned integer-valued property. More...
std::pair< bool, int > | getInt (const char *name, const char *ns=nullptr) const
| Returns an integer-valued property. More...
const PropertySet * | getPropertySet (const char *name, const char *ns=shibspconstants::ASCII_SHIBSPCONFIG_NS) const
| Returns a nested property set. More...
const xercesc::DOMElement * | getElement () const
| Returns a DOM element representing the property container, if any. More...
void | receive (DDF &in, std::ostream &out)
| Remoted classes implement this method to process incoming messages. More...
TransactionLog * | getTransactionLog () const
| Returns a TransactionLog instance. More...
xmltooling::StorageService * | getStorageService (const char *id) const
| Returns a StorageService instance based on an ID. More...
ListenerService * | getListenerService (bool required=true) const
| Returns a ListenerService instance. More...
SessionCache * | getSessionCache (bool required=true) const
| Returns a SessionCache instance. More...
RequestMapper * | getRequestMapper (bool required=true) const
| Returns a RequestMapper instance. More...
const Application * | getApplication (const char *applicationId) const
| Returns an Application instance matching the specified ID. More...
SecurityPolicyProvider * | getSecurityPolicyProvider (bool required=true) const
| Returns a SecurityPolicyProvider instance. More...
bool | setTransportOptions (xmltooling::SOAPTransport &transport) const
| Sets implementation-specific transport options. More...
void | regListener (const char *address, Remoted *svc)
| Register for a message. More...
bool | unregListener (const char *address, Remoted *current)
| Unregisters service from an address, possibly restoring an original. More...
Remoted * | lookupListener (const char *address) const
| Returns current service registered at an address, if any. More...
Public Member Functions inherited from shibsp::ServiceProvider
virtual void | init ()=0
| Loads a configuration and prepares the instance for use. More...
virtual const XMLCh * | getConfigurationNamespace () const =0
| Get the "active" XML namespace of the underlying configuration. More...
virtual TransactionLog * | getTransactionLog () const =0
| Returns a TransactionLog instance. More...
virtual xmltooling::StorageService * | getStorageService (const char *id) const =0
| Returns a StorageService instance based on an ID. More...
virtual SessionCache * | getSessionCache (bool required=true) const =0
| Returns a SessionCache instance. More...
virtual ListenerService * | getListenerService (bool required=true) const =0
| Returns a ListenerService instance. More...
virtual SecurityPolicyProvider * | getSecurityPolicyProvider (bool required=true) const =0
| Returns a SecurityPolicyProvider instance. More...
virtual bool | setTransportOptions (xmltooling::SOAPTransport &transport) const =0
| Sets implementation-specific transport options. More...
virtual RequestMapper * | getRequestMapper (bool required=true) const =0
| Returns a RequestMapper instance. More...
virtual const Application * | getApplication (const char *applicationId) const =0
| Returns an Application instance matching the specified ID. More...
virtual std::pair< bool, long > | doAuthentication (SPRequest &request, bool handler=false) const
| Enforces requirements for an authenticated session. More...
virtual std::pair< bool, long > | doAuthorization (SPRequest &request) const
| Enforces authorization requirements based on the authenticated session. More...
virtual std::pair< bool, long > | doExport (SPRequest &request, bool requireSession=true) const
| Publishes session contents to the request in the form of headers or environment variables. More...
virtual std::pair< bool, long > | doHandler (SPRequest &request) const
| Services requests for registered Handler locations. More...
virtual void | regListener (const char *address, Remoted *svc)=0
| Register for a message. More...
virtual bool | unregListener (const char *address, Remoted *current)=0
| Unregisters service from an address, possibly restoring an original. More...
virtual Remoted * | lookupListener (const char *address) const =0
| Returns current service registered at an address, if any. More...
virtual const PropertySet * | getParent () const =0
| Returns parent of this PropertySet, if any. More...
virtual void | setParent (const PropertySet *parent)=0
| Establishes a "parent" PropertySet to supply inherited settings. More...
virtual std::pair< bool, bool > | getBool (const char *name, const char *ns=nullptr) const =0
| Returns a boolean-valued property. More...
virtual std::pair< bool, const char * > | getString (const char *name, const char *ns=nullptr) const =0
| Returns a string-valued property. More...
virtual std::pair< bool, const XMLCh * > | getXMLString (const char *name, const char *ns=nullptr) const =0
| Returns a Unicode string-valued property. More...
virtual std::pair< bool, unsigned int > | getUnsignedInt (const char *name, const char *ns=nullptr) const =0
| Returns an unsigned integer-valued property. More...
virtual std::pair< bool, int > | getInt (const char *name, const char *ns=nullptr) const =0
| Returns an integer-valued property. More...
virtual const PropertySet * | getPropertySet (const char *name, const char *ns=shibspconstants::ASCII_SHIBSPCONFIG_NS) const =0
| Returns a nested property set. More...
virtual const xercesc::DOMElement * | getElement () const =0
| Returns a DOM element representing the property container, if any. More...
virtual void | receive (DDF &in, std::ostream &out)=0
| Remoted classes implement this method to process incoming messages. More...

## Protected Member Functions
std::pair< bool, xercesc::DOMElement * > | background_load ()

## Friends
class | XMLConfigImpl

## Additional Inherited Members
Protected Attributes inherited from shibsp::ServiceProvider
std::set< std::string > | m_authTypes
| The AuthTypes to "recognize" (defaults to "shibboleth").

## Member Function Documentation

## ◆ getApplication()

const Application * shibsp::XMLConfig::getApplication | ( | const char * | applicationId | ) | const
| virtual

Returns an Application instance matching the specified ID.

Parameters

  applicationId | the ID of the application, or nullptr for the default

Returns
  pointer to the application, or nullptr

Implements shibsp::ServiceProvider.

## ◆ getBool()

std::pair< bool, bool > shibsp::XMLConfig::getBool | ( | const char * | name,
|  | const char * | ns = `nullptr`
| ) |  | const
| inline virtual

Returns a boolean-valued property.

Parameters

  name | property name
  ns | property namespace, or nullptr

Returns
  a pair consisting of a nullptr indicator and the property value iff the indicator is true

Implements shibsp::PropertySet.

## ◆ getConfigurationNamespace()

const XMLCh * shibsp::XMLConfig::getConfigurationNamespace | ( |  | ) | const
| inline virtual

Get the "active" XML namespace of the underlying configuration.

This accomodates multiple supported configuration schemas at runtime by allowing components to tailor their behavior to the specific format in use.

Implements shibsp::ServiceProvider.

## ◆ getElement()

const xercesc::DOMElement * shibsp::XMLConfig::getElement | ( |  | ) | const
| inline virtual

Returns a DOM element representing the property container, if any.

Returns
  a DOM element, or nullptr

Implements shibsp::PropertySet.

## ◆ getInt()

std::pair< bool, int > shibsp::XMLConfig::getInt | ( | const char * | name,
|  | const char * | ns = `nullptr`
| ) |  | const
| inline virtual

Returns an integer-valued property.

Parameters

  name | property name
  ns | property namespace, or nullptr

Returns
  a pair consisting of a nullptr indicator and the property value iff the indicator is true

Implements shibsp::PropertySet.

## ◆ getListenerService()

ListenerService * shibsp::XMLConfig::getListenerService | ( | bool | required = `true` | ) | const
| inline virtual

Returns a ListenerService instance.

Parameters

  required | true iff an exception should be thrown if no ListenerService is available

Returns
  a ListenerService

Implements shibsp::ServiceProvider.

## ◆ getParent()

const PropertySet * shibsp::XMLConfig::getParent | ( |  | ) | const
| inline virtual

Returns parent of this PropertySet, if any.

Returns
  the parent object, or nullptr

Implements shibsp::PropertySet.

## ◆ getPropertySet()

const PropertySet * shibsp::XMLConfig::getPropertySet | ( | const char * | name,
|  | const char * | ns = `shibspconstants::ASCII_SHIBSPCONFIG_NS`
| ) |  | const
| inline virtual

Returns a nested property set.

Parameters

  name | nested property set name
  ns | nested property set namespace, or nullptr

Returns
  the nested property set, or nullptr

Implements shibsp::PropertySet.

## ◆ getRequestMapper()

RequestMapper * shibsp::XMLConfig::getRequestMapper | ( | bool | required = `true` | ) | const
| inline virtual

Returns a RequestMapper instance.

Parameters

  required | true iff an exception should be thrown if no RequestMapper is available

Returns
  a RequestMapper

Implements shibsp::ServiceProvider.

## ◆ getSecurityPolicyProvider()

SecurityPolicyProvider * shibsp::XMLConfig::getSecurityPolicyProvider | ( | bool | required = `true` | ) | const
| inline virtual

Returns a SecurityPolicyProvider instance.

Parameters

  required | true iff an exception should be thrown if no SecurityPolicyProvider is available

Returns
  a SecurityPolicyProvider

Implements shibsp::ServiceProvider.

## ◆ getSessionCache()

SessionCache * shibsp::XMLConfig::getSessionCache | ( | bool | required = `true` | ) | const
| inline virtual

Returns a SessionCache instance.

Parameters

  required | true iff an exception should be thrown if no SessionCache is available

Returns
  a SessionCache

Implements shibsp::ServiceProvider.

## ◆ getStorageService()

xmltooling::StorageService * shibsp::XMLConfig::getStorageService | ( | const char * | id | ) | const
| virtual

Returns a StorageService instance based on an ID.

Parameters

  id | a nullptr-terminated key identifying the StorageService to the configuration

Returns
  a StorageService if available, or nullptr

Implements shibsp::ServiceProvider.

## ◆ getString()

std::pair< bool, const char * > shibsp::XMLConfig::getString | ( | const char * | name,
|  | const char * | ns = `nullptr`
| ) |  | const
| inline virtual

Returns a string-valued property.

Parameters

  name | property name
  ns | property namespace, or nullptr

Returns
  a pair consisting of a nullptr indicator and the property value iff the indicator is true

Implements shibsp::PropertySet.

## ◆ getTransactionLog()

TransactionLog * shibsp::XMLConfig::getTransactionLog | ( |  | ) | const
| inline virtual

Returns a TransactionLog instance.

Returns
  a TransactionLog instance

Implements shibsp::ServiceProvider.

## ◆ getUnsignedInt()

std::pair< bool, unsigned int > shibsp::XMLConfig::getUnsignedInt | ( | const char * | name,
|  | const char * | ns = `nullptr`
| ) |  | const
| inline virtual

Returns an unsigned integer-valued property.

Parameters

  name | property name
  ns | property namespace, or nullptr

Returns
  a pair consisting of a nullptr indicator and the property value iff the indicator is true

Implements shibsp::PropertySet.

## ◆ getXMLString()

std::pair< bool, const XMLCh * > shibsp::XMLConfig::getXMLString | ( | const char * | name,
|  | const char * | ns = `nullptr`
| ) |  | const
| inline virtual

Returns a Unicode string-valued property.

Parameters

  name | property name
  ns | property namespace, or nullptr

Returns
  a pair consisting of a nullptr indicator and the property value iff the indicator is true

Implements shibsp::PropertySet.

## ◆ init()

void shibsp::XMLConfig::init | ( |  | ) |
| inline virtual

Loads a configuration and prepares the instance for use.

Implemented as a separate method so that services can rely on other services while they initialize by accessing the ServiceProvider from the SPConfig singleton.

Implements shibsp::ServiceProvider.

## ◆ lookupListener()

Remoted * shibsp::XMLConfig::lookupListener | ( | const char * | address | ) | const
| virtual

Returns current service registered at an address, if any.

Parameters

  address | message address to access

Returns
  registered service, or nullptr

Implements shibsp::ServiceProvider.

## ◆ receive()

void shibsp::XMLConfig::receive | ( | DDF & | in,
|  | std::ostream & | out
| ) |  |
| virtual

Remoted classes implement this method to process incoming messages.

Parameters

  in | incoming DDF message
  out | stream to write outgoing DDF message to

Implements shibsp::Remoted.

## ◆ regListener()

void shibsp::XMLConfig::regListener | ( | const char * | address,
|  | Remoted * | svc
| ) |  |
| virtual

Register for a message.

Parameters

  address | message address to register
  svc | pointer to remote service

Implements shibsp::ServiceProvider.

## ◆ setParent()

void shibsp::XMLConfig::setParent | ( | const PropertySet * | parent | ) |
| inline virtual

Establishes a "parent" PropertySet to supply inherited settings.

Parameters

  parent | the parent PropertySet to use

Implements shibsp::PropertySet.

## ◆ setTransportOptions()

bool shibsp::XMLConfig::setTransportOptions | ( | xmltooling::SOAPTransport & | transport | ) | const
| virtual

Sets implementation-specific transport options.

Parameters

  transport | a SOAPTransport object

Returns
  true iff all options were successfully set

Implements shibsp::ServiceProvider.

## ◆ unregListener()

bool shibsp::XMLConfig::unregListener | ( | const char * | address,
|  | Remoted * | current
| ) |  |
| virtual

Unregisters service from an address, possibly restoring an original.

Parameters

  address | message address to modify
  current | pointer to unregistering service

Returns
  true iff the current service was still registered

Implements shibsp::ServiceProvider.

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

- shibsp/impl/XMLServiceProvider.h