shibboleth-2.4.3
shibsp::SessionInitiator Class Reference

Pluggable runtime functionality that handles initiating sessions. More...

#include <shibsp/handler/SessionInitiator.h>

Inheritance diagram for shibsp::SessionInitiator:
Collaboration diagram for shibsp::SessionInitiator:

Public Member Functions

virtual const std::set
< std::string > & 
getSupportedOptions () const
 Indicates the set of optional settings supported by the handler.
virtual std::pair< bool, long > run (SPRequest &request, std::string &entityID, bool isHandler=true) const =0
 Executes an incoming request.
std::pair< bool, long > run (SPRequest &request, bool isHandler=true) const
 Executes handler functionality as an incoming request.
const char * getType () const
 Returns the "type" of the Handler plugin.
void generateMetadata (opensaml::saml2md::SPSSODescriptor &role, const char *handlerURL) const
 Generates and/or modifies metadata reflecting the Handler.
- Public Member Functions inherited from shibsp::Handler
virtual const XMLCh * getProtocolFamily () const
 Returns an identifier for the protocol family associated with the handler, if any.
- Public Member Functions inherited from shibsp::PropertySet
virtual const PropertySetgetParent () const =0
 Returns parent of this PropertySet, if any.
virtual void setParent (const PropertySet *parent)=0
 Establishes a "parent" PropertySet to supply inherited settings.
virtual std::pair< bool, bool > getBool (const char *name, const char *ns=nullptr) const =0
 Returns a boolean-valued property.
virtual std::pair< bool, const
char * > 
getString (const char *name, const char *ns=nullptr) const =0
 Returns a string-valued property.
virtual std::pair< bool, const
XMLCh * > 
getXMLString (const char *name, const char *ns=nullptr) const =0
 Returns a Unicode string-valued property.
virtual std::pair< bool,
unsigned int > 
getUnsignedInt (const char *name, const char *ns=nullptr) const =0
 Returns an unsigned integer-valued property.
virtual std::pair< bool, int > getInt (const char *name, const char *ns=nullptr) const =0
 Returns an integer-valued property.
virtual void getAll (std::map< std::string, const char * > &properties) const =0
 Returns a map of all known properties in string form.
virtual const PropertySetgetPropertySet (const char *name, const char *ns=shibspconstants::ASCII_SHIB2SPCONFIG_NS) const =0
 Returns a nested property set.
virtual const xercesc::DOMElement * getElement () const =0
 Returns a DOM element representing the property container, if any.

Protected Member Functions

bool checkCompatibility (SPRequest &request, bool isHandler) const
 Examines the request and applicable settings to determine whether the handler is able to support the request.
- Protected Member Functions inherited from shibsp::Handler
virtual void log (SPRequest::SPLogLevel level, const std::string &msg) const
 Log using handler's specific logging object.
virtual void preserveRelayState (const Application &application, xmltooling::HTTPResponse &response, std::string &relayState) const
 Implements various mechanisms to preserve RelayState, such as cookies or StorageService-backed keys.
virtual void recoverRelayState (const Application &application, const xmltooling::HTTPRequest &request, xmltooling::HTTPResponse &response, std::string &relayState, bool clear=true) const
 Implements various mechanisms to recover RelayState, such as cookies or StorageService-backed keys.

Protected Attributes

std::set< std::string > m_supportedOptions
 Set of optional settings supported by handler.

Static Protected Attributes

static std::map< std::string,
std::string > 
m_remapper
 Property remapper for configuration compatibility.

Friends

void registerSessionInitiators ()
 Registers SessionInitiator implementations.

Detailed Description

Pluggable runtime functionality that handles initiating sessions.

By default, SessionInitiators look for an entityID on the incoming request and pass control to the specialized run method.

Member Function Documentation

bool shibsp::SessionInitiator::checkCompatibility ( SPRequest request,
bool  isHandler 
) const
protected

Examines the request and applicable settings to determine whether the handler is able to support the request.

If the handler is within a chain, the method will return false, otherwise an exception will be raised.

Parameters
requestSP request context
isHandlertrue iff executing in the context of a direct handler invocation
Returns
true iff the request appears to be compatible
void shibsp::SessionInitiator::generateMetadata ( opensaml::saml2md::SPSSODescriptor &  role,
const char *  handlerURL 
) const
virtual

Generates and/or modifies metadata reflecting the Handler.

The default implementation does nothing.

Parameters
rolemetadata role to decorate
handlerURLbase location of handler's endpoint

Reimplemented from shibsp::Handler.

virtual const std::set<std::string>& shibsp::SessionInitiator::getSupportedOptions ( ) const
virtual

Indicates the set of optional settings supported by the handler.

Returns
a set of the optional settings supported
const char* shibsp::SessionInitiator::getType ( ) const
virtual

Returns the "type" of the Handler plugin.

Returns
a Handler type

Reimplemented from shibsp::Handler.

virtual std::pair<bool,long> shibsp::SessionInitiator::run ( SPRequest request,
std::string &  entityID,
bool  isHandler = true 
) const
pure virtual

Executes an incoming request.

SessionInitiators can be run either directly by incoming web requests or indirectly/implicitly during other SP processing.

Parameters
requestSP request context
entityIDthe name of an IdP to request a session from, if known
isHandlertrue iff executing in the context of a direct handler invocation
Returns
a pair containing a "request completed" indicator and a server-specific response code
std::pair<bool,long> shibsp::SessionInitiator::run ( SPRequest request,
bool  isHandler = true 
) const
virtual

Executes handler functionality as an incoming request.

Handlers can be run either directly by incoming web requests or indirectly/implicitly during other SP processing.

Parameters
requestSP request context
isHandlertrue iff executing in the context of a direct handler invocation
Returns
a pair containing a "request completed" indicator and a server-specific response code

Implements shibsp::Handler.

Friends And Related Function Documentation

void registerSessionInitiators ( )
friend

Registers SessionInitiator implementations.

Member Data Documentation

std::map<std::string,std::string> shibsp::SessionInitiator::m_remapper
staticprotected

Property remapper for configuration compatibility.

std::set<std::string> shibsp::SessionInitiator::m_supportedOptions
protected

Set of optional settings supported by handler.


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