shibboleth-3.4.1
|
Interface to a Shibboleth Application instance. More...
#include <shibsp/Application.h>
Public Member Functions | |
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 |
virtual std::pair< std::string, const char * > | getCookieNameProps (const char *prefix, time_t *lifetime=nullptr) const |
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... | |
Protected Member Functions | |
Application (const ServiceProvider *sp) | |
Constructor. More... | |
Protected Attributes | |
const ServiceProvider * | m_sp |
Pointer to parent SP instance. More... | |
xmltooling::RWLock * | m_lock |
Shared lock for manipulating application state. More... | |
std::vector< std::pair< std::string, std::string > > | m_unsetHeaders |
Pairs of raw and normalized CGI header names to clear. More... | |
Interface to a Shibboleth Application instance.
An Application is a logical set of resources that act as a unit of session management and policy.
|
protected |
Constructor.
sp | parent ServiceProvider instance |
|
virtual |
Clears any headers that may be used to hold attributes after export.
request | SP request to clear |
|
virtual |
Ensures no value exists for a request header, allowing for application-specific customization.
request | SP request to modify |
rawname | raw name of header to clear |
cginame | CGI-equivalent name of header, MUST begin with "HTTP_". |
Reimplemented in shibsp::XMLApplication.
|
pure virtual |
Returns an AssertionConsumerService Handler with a particular index for use in AuthnRequest messages.
index | an index unique to an application |
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns an AssertionConsumerService Handler that supports a particular protocol "family" and optional binding.
protocol | a protocol identifier |
binding | a binding identifier |
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns an AttributeExtractor for use with this Application.
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns an AttributeFilter for use with this Application.
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns an AttributeResolver for use with this Application.
Implemented in shibsp::XMLApplication.
|
pure virtual |
Implemented in shibsp::XMLApplication.
|
virtual |
Returns the cookies name to use for this Application.
prefix | a value to prepend to the base cookie name |
lifetime | if non-null, will be populated with a suggested lifetime for the cookie, or 0 if session-bound |
|
virtual |
Returns the name and cookie properties to use for this Application.
prefix | a value to prepend to the base cookie name |
lifetime | if non-null, will be populated with a suggested lifetime for the cookie, or 0 if session-bound |
|
pure virtual |
Returns the CredentialResolver instance associated with this Application.
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns the default AssertionConsumerService Handler for use in AuthnRequest messages.
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns the default SessionInitiator when automatically requesting a session.
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns the Handler associated with a particular path/location.
path | the PATH_INFO appended to the end of a base Handler location that invokes the Handler |
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns all registered Handlers.
handlers | array to populate |
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns a unique hash for the Application.
Implemented in shibsp::XMLApplication.
|
virtual |
Returns the Application's ID.
|
pure virtual |
Returns a MetadataProvider for use with this Application.
required | true iff an exception should be thrown if no MetadataProvider is available |
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns the designated notification URL, or an empty string if no more locations are specified.
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 |
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns configuration properties governing security interactions with a peer.
provider | a peer entity's metadata |
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns configuration properties governing security interactions with a named peer.
entityID | a peer name |
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns an array of attribute IDs to use as a REMOTE_USER value, in order of preference.
Implemented in shibsp::XMLApplication.
|
virtual |
Returns a non-spoofable request header value allowing for application-specific customization.
request | SP request to access |
name | the name of the secure header to return |
Reimplemented in shibsp::XMLApplication.
const ServiceProvider& shibsp::Application::getServiceProvider | ( | ) | const |
Returns the owning ServiceProvider instance.
|
pure virtual |
Returns a SessionInitiator with a particular ID when automatically requesting a session.
id | an identifier unique to the Application |
Implemented in shibsp::XMLApplication.
|
pure virtual |
Returns a TrustEngine for use with this Application.
required | true iff an exception should be thrown if no TrustEngine is available |
Implemented in shibsp::XMLApplication.
|
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.
request | the request leading to the redirect |
url | an absolute URL to validate |
Reimplemented in shibsp::XMLApplication.
|
virtual |
Sets a value for a request header allowing for application-specific customization.
request | SP request to modify |
name | name of header to set |
value | value to set |
Reimplemented in shibsp::XMLApplication.
|
mutableprotected |
Shared lock for manipulating application state.
|
protected |
Pointer to parent SP instance.
|
mutableprotected |
Pairs of raw and normalized CGI header names to clear.