Interface to a Shibboleth ServiceProvider instance. More...
#include <shibsp/ServiceProvider.h>
Public Member Functions | |
virtual void | init ()=0 |
Loads a configuration and prepares the instance for use. | |
virtual TransactionLog * | getTransactionLog () const =0 |
Returns a TransactionLog instance. | |
virtual xmltooling::StorageService * | getStorageService (const char *id) const =0 |
Returns a StorageService instance based on an ID. | |
virtual SessionCache * | getSessionCache (bool required=true) const =0 |
Returns a SessionCache instance. | |
virtual ListenerService * | getListenerService (bool required=true) const =0 |
Returns a ListenerService instance. | |
virtual SecurityPolicyProvider * | getSecurityPolicyProvider (bool required=true) const |
Returns a SecurityPolicyProvider instance. | |
virtual const PropertySet * | getPolicySettings (const char *id) const =0 |
virtual const std::vector < const opensaml::SecurityPolicyRule * > & | getPolicyRules (const char *id) const =0 |
virtual bool | setTransportOptions (xmltooling::SOAPTransport &transport) const =0 |
Sets implementation-specific transport options. | |
virtual RequestMapper * | getRequestMapper (bool required=true) const =0 |
Returns a RequestMapper instance. | |
virtual const Application * | getApplication (const char *applicationId) const =0 |
Returns an Application instance matching the specified ID. | |
virtual std::pair< bool, long > | doAuthentication (SPRequest &request, bool handler=false) const |
Enforces requirements for an authenticated session. | |
virtual std::pair< bool, long > | doAuthorization (SPRequest &request) const |
Enforces authorization requirements based on the authenticated session. | |
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. | |
virtual std::pair< bool, long > | doHandler (SPRequest &request) const |
Services requests for registered Handler locations. | |
virtual Remoted * | regListener (const char *address, Remoted *svc) |
Register for a message. | |
virtual bool | unregListener (const char *address, Remoted *current, Remoted *restore=nullptr) |
Unregisters service from an address, possibly restoring an original. | |
virtual Remoted * | lookupListener (const char *address) const |
Returns current service registered at an address, if any. | |
Protected Attributes | |
std::set< std::string > | m_authTypes |
The AuthTypes to "recognize" (defaults to "shibboleth"). |
Interface to a Shibboleth ServiceProvider instance.
A ServiceProvider exposes configuration and infrastructure services required by the SP implementation, allowing a flexible configuration format.
virtual std::pair<bool,long> shibsp::ServiceProvider::doAuthentication | ( | SPRequest & | request, | |
bool | handler = false | |||
) | const [virtual] |
Enforces requirements for an authenticated session.
If the return value's first member is true, then request processing should terminate with the second member as a status value. If false, processing can continue.
request | SP request interface | |
handler | true iff a request to a registered Handler location can be directly executed |
virtual std::pair<bool,long> shibsp::ServiceProvider::doAuthorization | ( | SPRequest & | request | ) | const [virtual] |
Enforces authorization requirements based on the authenticated session.
If the return value's first member is true, then request processing should terminate with the second member as a status value. If false, processing can continue.
request | SP request interface |
virtual std::pair<bool,long> shibsp::ServiceProvider::doExport | ( | SPRequest & | request, | |
bool | requireSession = true | |||
) | const [virtual] |
Publishes session contents to the request in the form of headers or environment variables.
If the return value's first member is true, then request processing should terminate with the second member as a status value. If false, processing can continue.
request | SP request interface | |
requireSession | set to true iff an error should result if no session exists |
virtual std::pair<bool,long> shibsp::ServiceProvider::doHandler | ( | SPRequest & | request | ) | const [virtual] |
Services requests for registered Handler locations.
If the return value's first member is true, then request processing should terminate with the second member as a status value. If false, processing can continue.
request | SP request interface |
virtual const Application* shibsp::ServiceProvider::getApplication | ( | const char * | applicationId | ) | const [pure virtual] |
Returns an Application instance matching the specified ID.
applicationId | the ID of the application, or nullptr for the default |
virtual ListenerService* shibsp::ServiceProvider::getListenerService | ( | bool | required = true |
) | const [pure virtual] |
Returns a ListenerService instance.
required | true iff an exception should be thrown if no ListenerService is available |
virtual const std::vector<const opensaml::SecurityPolicyRule*>& shibsp::ServiceProvider::getPolicyRules | ( | const char * | id | ) | const [pure virtual] |
id | identifies the policy to return, or nullptr for default |
virtual const PropertySet* shibsp::ServiceProvider::getPolicySettings | ( | const char * | id | ) | const [pure virtual] |
id | identifies the policy to return, or nullptr for default |
virtual RequestMapper* shibsp::ServiceProvider::getRequestMapper | ( | bool | required = true |
) | const [pure virtual] |
Returns a RequestMapper instance.
required | true iff an exception should be thrown if no RequestMapper is available |
virtual SecurityPolicyProvider* shibsp::ServiceProvider::getSecurityPolicyProvider | ( | bool | required = true |
) | const [virtual] |
Returns a SecurityPolicyProvider instance.
required | true iff an exception should be thrown if no SecurityPolicyProvider is available |
virtual SessionCache* shibsp::ServiceProvider::getSessionCache | ( | bool | required = true |
) | const [pure virtual] |
Returns a SessionCache instance.
required | true iff an exception should be thrown if no SessionCache is available |
virtual xmltooling::StorageService* shibsp::ServiceProvider::getStorageService | ( | const char * | id | ) | const [pure virtual] |
Returns a StorageService instance based on an ID.
id | a nullptr-terminated key identifying the StorageService to the configuration |
virtual TransactionLog* shibsp::ServiceProvider::getTransactionLog | ( | ) | const [pure virtual] |
Returns a TransactionLog instance.
virtual void shibsp::ServiceProvider::init | ( | ) | [pure 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.
virtual Remoted* shibsp::ServiceProvider::lookupListener | ( | const char * | address | ) | const [virtual] |
Returns current service registered at an address, if any.
address | message address to access |
virtual Remoted* shibsp::ServiceProvider::regListener | ( | const char * | address, | |
Remoted * | svc | |||
) | [virtual] |
Register for a message.
Returns existing remote service, allowing message hooking.
address | message address to register | |
svc | pointer to remote service |
virtual bool shibsp::ServiceProvider::setTransportOptions | ( | xmltooling::SOAPTransport & | transport | ) | const [pure virtual] |
Sets implementation-specific transport options.
transport | a SOAPTransport object |
virtual bool shibsp::ServiceProvider::unregListener | ( | const char * | address, | |
Remoted * | current, | |||
Remoted * | restore = nullptr | |||
) | [virtual] |
Unregisters service from an address, possibly restoring an original.
address | message address to modify | |
current | pointer to unregistering service | |
restore | service to "restore" registration for |
std::set<std::string> shibsp::ServiceProvider::m_authTypes [protected] |
The AuthTypes to "recognize" (defaults to "shibboleth").