shibboleth-3.5.0

Public Member Functions | List of all members
shibsp::XMLApplication Class Reference
Inheritance diagram for shibsp::XMLApplication:

## Public Member Functions
| XMLApplication (const ServiceProvider *, const ProtocolProvider *, xercesc::DOMElement *, bool deprecationSupport, const XMLApplication *base=nullptr, xercesc::DOMDocument *doc=nullptr)
const char * | getHash () const
| Returns a unique hash for the Application. More...
opensaml::SAMLArtifact * | generateSAML1Artifact (const opensaml::saml2md::EntityDescriptor *relyingParty) const
opensaml::saml2p::SAML2Artifact * | generateSAML2Artifact (const opensaml::saml2md::EntityDescriptor *relyingParty) const
opensaml::saml2md::MetadataProvider * | getMetadataProvider (bool required=true) const
| Returns a MetadataProvider for use with this Application. More...
xmltooling::TrustEngine * | getTrustEngine (bool required=true) const
| Returns a TrustEngine for use with this Application. More...
AttributeExtractor * | getAttributeExtractor () const
| Returns an AttributeExtractor for use with this Application. More...
AttributeFilter * | getAttributeFilter () const
| Returns an AttributeFilter for use with this Application. More...
AttributeResolver * | getAttributeResolver () const
| Returns an AttributeResolver for use with this Application. More...
xmltooling::CredentialResolver * | getCredentialResolver () const
| Returns the CredentialResolver instance associated with this Application. More...
const PropertySet * | getRelyingParty (const opensaml::saml2md::EntityDescriptor *provider) const
| Returns configuration properties governing security interactions with a peer. More...
const PropertySet * | getRelyingParty (const XMLCh *entityID) const
| Returns configuration properties governing security interactions with a named peer. More...
const std::vector< const XMLCh * > * | getAudiences () const
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::string | getNotificationURL (const char *resource, bool front, unsigned int index) const
| Returns the designated notification URL, or an empty string if no more locations are specified. More...
const std::vector< std::string > & | getRemoteUserAttributeIds () const
| Returns an array of attribute IDs to use as a REMOTE_USER value, in order of preference. More...
void | clearHeader (SPRequest &request, const char *rawname, const char *cginame) const
| Ensures no value exists for a request header, allowing for application-specific customization. More...
void | setHeader (SPRequest &request, const char *name, const char *value) const
| Sets a value for a request header allowing for application-specific customization. More...
std::string | getSecureHeader (const SPRequest &request, const char *name) const
| Returns a non-spoofable request header value allowing for application-specific customization. More...
const SessionInitiator * | getDefaultSessionInitiator () const
| Returns the default SessionInitiator when automatically requesting a session. More...
const SessionInitiator * | getSessionInitiatorById (const char *id) const
| Returns a SessionInitiator with a particular ID when automatically requesting a session. More...
const Handler * | getDefaultAssertionConsumerService () const
| Returns the default AssertionConsumerService Handler for use in AuthnRequest messages. More...
const Handler * | getAssertionConsumerServiceByIndex (unsigned short index) const
| Returns an AssertionConsumerService Handler with a particular index for use in AuthnRequest messages. More...
const Handler * | getAssertionConsumerServiceByProtocol (const XMLCh *protocol, const char *binding=nullptr) const
| Returns an AssertionConsumerService Handler that supports a particular protocol "family" and optional binding. More...
const Handler * | getHandler (const char *path) const
| Returns the Handler associated with a particular path/location. More...
void | getHandlers (std::vector< const Handler * > &handlers) const
| Returns all registered Handlers. More...
void | limitRedirect (const xmltooling::GenericRequest &request, const char *url) const
| Checks a proposed redirect URL against application-specific settings for legal redirects, such as same-host restrictions or allowed domains, and raises a SecurityPolicyException in the event of a violation. More...
void | receive (DDF &in, std::ostream &out)
| Remoted classes implement this method to process incoming messages. More...
xercesc::DOMNodeFilter::FilterAction | acceptNode (const xercesc::DOMNode *node) const
Public Member Functions inherited from shibsp::Application
const ServiceProvider & | getServiceProvider () const
| Returns the owning ServiceProvider instance. More...
virtual const char * | getId () const
| Returns the Application's ID. More...
virtual const char * | getHash () const =0
| Returns a unique hash for the Application. More...
virtual std::string | getCookieName (const char *prefix, time_t *lifetime=nullptr) const
| @Deprecated More...
virtual std::pair< std::string, const char * > | getCookieNameProps (const char *prefix, time_t *lifetime=nullptr) const
| @Deprecated More...
virtual opensaml::saml2md::MetadataProvider * | getMetadataProvider (bool required=true) const =0
| Returns a MetadataProvider for use with this Application. More...
virtual xmltooling::TrustEngine * | getTrustEngine (bool required=true) const =0
| Returns a TrustEngine for use with this Application. More...
virtual AttributeExtractor * | getAttributeExtractor () const =0
| Returns an AttributeExtractor for use with this Application. More...
virtual AttributeFilter * | getAttributeFilter () const =0
| Returns an AttributeFilter for use with this Application. More...
virtual AttributeResolver * | getAttributeResolver () const =0
| Returns an AttributeResolver for use with this Application. More...
virtual xmltooling::CredentialResolver * | getCredentialResolver () const =0
| Returns the CredentialResolver instance associated with this Application. More...
virtual const PropertySet * | getRelyingParty (const opensaml::saml2md::EntityDescriptor *provider) const =0
| Returns configuration properties governing security interactions with a peer. More...
virtual const PropertySet * | getRelyingParty (const XMLCh *entityID) const =0
| Returns configuration properties governing security interactions with a named peer. More...
virtual const std::vector< const XMLCh * > * | getAudiences () const =0
virtual std::string | getNotificationURL (const char *request, bool front, unsigned int index) const =0
| Returns the designated notification URL, or an empty string if no more locations are specified. More...
virtual const std::vector< std::string > & | getRemoteUserAttributeIds () const =0
| Returns an array of attribute IDs to use as a REMOTE_USER value, in order of preference. More...
virtual void | clearHeader (SPRequest &request, const char *rawname, const char *cginame) const
| Ensures no value exists for a request header, allowing for application-specific customization. More...
virtual void | setHeader (SPRequest &request, const char *name, const char *value) const
| Sets a value for a request header allowing for application-specific customization. More...
virtual std::string | getSecureHeader (const SPRequest &request, const char *name) const
| Returns a non-spoofable request header value allowing for application-specific customization. More...
virtual void | clearAttributeHeaders (SPRequest &request) const
| Clears any headers that may be used to hold attributes after export. More...
virtual const SessionInitiator * | getDefaultSessionInitiator () const =0
| Returns the default SessionInitiator when automatically requesting a session. More...
virtual const SessionInitiator * | getSessionInitiatorById (const char *id) const =0
| Returns a SessionInitiator with a particular ID when automatically requesting a session. More...
virtual const Handler * | getDefaultAssertionConsumerService () const =0
| Returns the default AssertionConsumerService Handler for use in AuthnRequest messages. More...
virtual const Handler * | getAssertionConsumerServiceByIndex (unsigned short index) const =0
| Returns an AssertionConsumerService Handler with a particular index for use in AuthnRequest messages. More...
virtual const Handler * | getAssertionConsumerServiceByProtocol (const XMLCh *protocol, const char *binding=nullptr) const =0
| Returns an AssertionConsumerService Handler that supports a particular protocol "family" and optional binding. More...
virtual const Handler * | getHandler (const char *path) const =0
| Returns the Handler associated with a particular path/location. More...
virtual void | getHandlers (std::vector< const Handler * > &handlers) const =0
| Returns all registered Handlers. More...
virtual void | limitRedirect (const xmltooling::GenericRequest &request, const char *url) const
| Checks a proposed redirect URL against application-specific settings for legal redirects, such as same-host restrictions or allowed domains, and raises a SecurityPolicyException in the event of a violation. 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...
Public Member Functions inherited from shibsp::DOMPropertySet
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 | load (const xercesc::DOMElement *e, xmltooling::logging::Category *log=nullptr, xercesc::DOMNodeFilter *filter=nullptr, const Remapper *remapper=nullptr, const xmltooling::QName *unsetter=nullptr)
| Loads the property set from a DOM element. More...

## Additional Inherited Members
Protected Member Functions inherited from shibsp::Application
| Application (const ServiceProvider *sp)
| Constructor. More...
Protected Member Functions inherited from shibsp::DOMPropertySet
bool | setProperty (const char *name, const char *val, const char *ns=nullptr)
| Post-load injection of a property, for use by subclasses. More...
Protected Attributes inherited from shibsp::Application
const ServiceProvider * | m_sp
| Pointer to parent SP instance.
xmltooling::RWLock * | m_lock
| Shared lock for manipulating application state.
std::vector< std::pair< std::string, std::string > > | m_unsetHeaders
| Pairs of raw and normalized CGI header names to clear.

## Member Function Documentation

## ◆ clearHeader()

void shibsp::XMLApplication::clearHeader | ( | SPRequest & | request,
|  | const char * | rawname,
|  | const char * | cginame
| ) |  | const
| virtual

Ensures no value exists for a request header, allowing for application-specific customization.

Parameters

  request | SP request to modify
  rawname | raw name of header to clear
  cginame | CGI-equivalent name of header, MUST begin with "HTTP_".

Reimplemented from shibsp::Application.

## ◆ getAssertionConsumerServiceByIndex()

const Handler * shibsp::XMLApplication::getAssertionConsumerServiceByIndex | ( | unsigned short | index | ) | const
| virtual

Returns an AssertionConsumerService Handler with a particular index for use in AuthnRequest messages.

Parameters

  index | an index unique to an application

Returns
  the designated AssertionConsumerService, or nullptr

Implements shibsp::Application.

## ◆ getAssertionConsumerServiceByProtocol()

const Handler * shibsp::XMLApplication::getAssertionConsumerServiceByProtocol | ( | const XMLCh * | protocol,
|  | const char * | binding = `nullptr`
| ) |  | const
| virtual

Returns an AssertionConsumerService Handler that supports a particular protocol "family" and optional binding.

Parameters

  protocol | a protocol identifier
  binding | a binding identifier

Returns
  a matching AssertionConsumerService, or nullptr

Implements shibsp::Application.

## ◆ getAttributeExtractor()

AttributeExtractor * shibsp::XMLApplication::getAttributeExtractor | ( |  | ) | const
| inline virtual

Returns an AttributeExtractor for use with this Application.

Returns
  an AttributeExtractor, or nullptr

Implements shibsp::Application.

## ◆ getAttributeFilter()

AttributeFilter * shibsp::XMLApplication::getAttributeFilter | ( |  | ) | const
| inline virtual

Returns an AttributeFilter for use with this Application.

Returns
  an AttributeFilter, or nullptr

Implements shibsp::Application.

## ◆ getAttributeResolver()

AttributeResolver * shibsp::XMLApplication::getAttributeResolver | ( |  | ) | const
| inline virtual

Returns an AttributeResolver for use with this Application.

Returns
  an AttributeResolver, or nullptr

Implements shibsp::Application.

## ◆ getAudiences()

const std::vector< const XMLCh * > * shibsp::XMLApplication::getAudiences | ( |  | ) | const
| inline virtual

Deprecated:
  Returns any additional audience values associated with this Application.

Returns
  additional audience values associated with the Application, or nullptr

Implements shibsp::Application.

## ◆ getCredentialResolver()

xmltooling::CredentialResolver * shibsp::XMLApplication::getCredentialResolver | ( |  | ) | const
| inline virtual

Returns the CredentialResolver instance associated with this Application.

Returns
  a CredentialResolver, or nullptr

Implements shibsp::Application.

## ◆ getDefaultAssertionConsumerService()

const Handler * shibsp::XMLApplication::getDefaultAssertionConsumerService | ( |  | ) | const
| virtual

Returns the default AssertionConsumerService Handler for use in AuthnRequest messages.

Returns
  the default AssertionConsumerService, or nullptr

Implements shibsp::Application.

## ◆ getDefaultSessionInitiator()

const SessionInitiator * shibsp::XMLApplication::getDefaultSessionInitiator | ( |  | ) | const
| virtual

Returns the default SessionInitiator when automatically requesting a session.

Returns
  the default SessionInitiator, or nullptr

Implements shibsp::Application.

## ◆ getHandler()

const Handler * shibsp::XMLApplication::getHandler | ( | const char * | path | ) | const
| virtual

Returns the Handler associated with a particular path/location.

Parameters

  path | the PATH_INFO appended to the end of a base Handler location that invokes the Handler

Returns
  the mapped Handler, or nullptr

Implements shibsp::Application.

## ◆ getHandlers()

void shibsp::XMLApplication::getHandlers | ( | std::vector< const Handler * > & | handlers | ) | const
| virtual

Returns all registered Handlers.

Parameters

  handlers | array to populate

Implements shibsp::Application.

## ◆ getHash()

const char * shibsp::XMLApplication::getHash | ( |  | ) | const
| inline virtual

Returns a unique hash for the Application.

Returns
  a value resulting from a computation over the Application's configuration

Implements shibsp::Application.

## ◆ getMetadataProvider()

opensaml::saml2md::MetadataProvider * shibsp::XMLApplication::getMetadataProvider | ( | bool | required = `true` | ) | const
| inline virtual

Returns a MetadataProvider for use with this Application.

Parameters

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

Returns
  a MetadataProvider instance, or nullptr

Implements shibsp::Application.

## ◆ getNotificationURL()

std::string shibsp::XMLApplication::getNotificationURL | ( | const char * | request,
|  | bool | front,
|  | unsigned int | index
| ) |  | const
| virtual

Returns the designated notification URL, or an empty string if no more locations are specified.

Parameters

  request | requested URL to use to fill in missing pieces of notification URL
  front | true iff front channel notification is desired, false iff back channel is desired
  index | zero-based index of URL to return

Returns
  the designated URL, or an empty string

Implements shibsp::Application.

## ◆ getRelyingParty() [1/2]

const PropertySet * shibsp::XMLApplication::getRelyingParty | ( | const opensaml::saml2md::EntityDescriptor * | provider | ) | const
| virtual

Returns configuration properties governing security interactions with a peer.

Parameters

  provider | a peer entity's metadata

Returns
  the applicable PropertySet

Implements shibsp::Application.

## ◆ getRelyingParty() [2/2]

const PropertySet * shibsp::XMLApplication::getRelyingParty | ( | const XMLCh * | entityID | ) | const
| virtual

Returns configuration properties governing security interactions with a named peer.

Parameters

  entityID | a peer name

Returns
  the applicable PropertySet

Implements shibsp::Application.

## ◆ getRemoteUserAttributeIds()

const std::vector< std::string > & shibsp::XMLApplication::getRemoteUserAttributeIds | ( |  | ) | const
| inline virtual

Returns an array of attribute IDs to use as a REMOTE_USER value, in order of preference.

Returns
  an array of attribute IDs, possibly empty

Implements shibsp::Application.

## ◆ getSecureHeader()

std::string shibsp::XMLApplication::getSecureHeader | ( | const SPRequest & | request,
|  | const char * | name
| ) |  | const
| virtual

Returns a non-spoofable request header value allowing for application-specific customization.

Parameters

  request | SP request to access
  name | the name of the secure header to return

Returns
  the header's value, or an empty string

Reimplemented from shibsp::Application.

## ◆ getSessionInitiatorById()

const SessionInitiator * shibsp::XMLApplication::getSessionInitiatorById | ( | const char * | id | ) | const
| virtual

Returns a SessionInitiator with a particular ID when automatically requesting a session.

Parameters

  id | an identifier unique to the Application

Returns
  the designated SessionInitiator, or nullptr

Implements shibsp::Application.

## ◆ getString()

std::pair< bool, const char * > shibsp::XMLApplication::getString | ( | const char * | name,
|  | const char * | ns = `nullptr`
| ) |  | const
| 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.

## ◆ getTrustEngine()

xmltooling::TrustEngine * shibsp::XMLApplication::getTrustEngine | ( | bool | required = `true` | ) | const
| inline virtual

Returns a TrustEngine for use with this Application.

Parameters

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

Returns
  a TrustEngine instance, or nullptr

Implements shibsp::Application.

## ◆ getXMLString()

std::pair< bool, const XMLCh * > shibsp::XMLApplication::getXMLString | ( | const char * | name,
|  | const char * | ns = `nullptr`
| ) |  | const
| 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.

## ◆ limitRedirect()

void shibsp::XMLApplication::limitRedirect | ( | const xmltooling::GenericRequest & | request,
|  | const char * | url
| ) |  | const
| virtual

Checks a proposed redirect URL against application-specific settings for legal redirects, such as same-host restrictions or allowed domains, and raises a SecurityPolicyException in the event of a violation.

Parameters

  request | the request leading to the redirect
  url | an absolute URL to validate

Reimplemented from shibsp::Application.

## ◆ receive()

void shibsp::XMLApplication::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.

## ◆ setHeader()

void shibsp::XMLApplication::setHeader | ( | SPRequest & | request,
|  | const char * | name,
|  | const char * | value
| ) |  | const
| virtual

Sets a value for a request header allowing for application-specific customization.

Parameters

  request | SP request to modify
  name | name of header to set
  value | value to set

Reimplemented from shibsp::Application.

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

- shibsp/impl/XMLApplication.h