shibsp::SecuredHandler Class Reference

Pluggable runtime functionality that is protected by simple access control. More...

`#include <shibsp/handler/SecuredHandler.h>`

Inheritance diagram for shibsp::SecuredHandler:
[legend]
Collaboration diagram for shibsp::SecuredHandler:
[legend]

## Public Member Functions

std::pair< bool, long > | run (SPRequest &request, bool isHandler=true) const
| Executes handler functionality as an incoming request.
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.
virtual void | generateMetadata (opensaml::saml2md::SPSSODescriptor &role, const char *handlerURL) const
| Generates and/or modifies metadata reflecting the Handler.
virtual const char * | getType () const
| Returns the "type" of the Handler plugin.
virtual const char * | getEventType () const
| Get the type of event, as input to error handling in response to errors raised by this handler.
Public Member Functions inherited from shibsp::DOMPropertySet
const PropertySet * | getParent () const
| Returns parent of this PropertySet, if any.
void | setParent (const PropertySet *parent)
| Establishes a "parent" PropertySet to supply inherited settings.
std::pair< bool, bool > | getBool (const char *name, const char *ns=nullptr) const
| Returns a boolean-valued property.
std::pair< bool, const char * > | getString (const char *name, const char *ns=nullptr) const
| Returns a string-valued property.
std::pair< bool, const XMLCh * > | getXMLString (const char *name, const char *ns=nullptr) const
| Returns a Unicode string-valued property.
std::pair< bool, unsigned int > | getUnsignedInt (const char *name, const char *ns=nullptr) const
| Returns an unsigned integer-valued property.
std::pair< bool, int > | getInt (const char *name, const char *ns=nullptr) const
| Returns an integer-valued property.
const PropertySet * | getPropertySet (const char *name, const char *ns=shibspconstants::ASCII_SHIBSPCONFIG_NS) const
| Returns a nested property set.
const xercesc::DOMElement * | getElement () const
| Returns a DOM element representing the property container, if any.
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.

## Protected Member Functions

| SecuredHandler (const xercesc::DOMElement *e, xmltooling::logging::Category &log, const char *aclProperty="acl", const char *defaultACL=nullptr, xercesc::DOMNodeFilter *filter=nullptr, const Remapper *remapper=nullptr)
| Constructor.
Protected Member Functions inherited from shibsp::AbstractHandler
| AbstractHandler (const xercesc::DOMElement *e, xmltooling::logging::Category &log, xercesc::DOMNodeFilter *filter=nullptr, const Remapper *remapper=nullptr)
| Constructor.
void | log (SPRequest::SPLogLevel level, const std::string &msg) const
| Log using handler's specific logging object.
virtual void | checkError (const xmltooling::XMLObject *response, const opensaml::saml2md::RoleDescriptor *role=nullptr) const
| Examines a protocol response message for errors and raises an annotated exception if an error is found.
void | fillStatus (opensaml::saml2p::StatusResponseType &response, const XMLCh *code, const XMLCh *subcode=nullptr, const char *msg=nullptr) const
| Prepares Status information in a SAML 2.0 response.
long | sendMessage (const opensaml::MessageEncoder &encoder, xmltooling::XMLObject *msg, const char *relayState, const char *destination, const opensaml::saml2md::RoleDescriptor *role, const Application &application, xmltooling::HTTPResponse &httpResponse, const char *defaultSigningProperty) const
| Encodes and sends SAML 2.0 message, optionally signing it in the process.
virtual void | preservePostData (const Application &application, const xmltooling::HTTPRequest &request, xmltooling::HTTPResponse &response, const char *relayState) const
| Implements a mechanism to preserve form post data.
virtual DDF | recoverPostData (const Application &application, const xmltooling::HTTPRequest &request, xmltooling::HTTPResponse &response, const char *relayState) const
| Implements storage service and cookie mechanism to recover PostData.
virtual long | sendPostResponse (const Application &application, xmltooling::HTTPResponse &response, const char *url, DDF &postData) const
| Post a redirect response with post data.
std::pair< bool, bool > | getBool (const char *name, const xmltooling::HTTPRequest &request, unsigned int type=HANDLER_PROPERTY_ALL) const
| Returns a boolean-valued property.
std::pair< bool, const char * > | getString (const char *name, const xmltooling::HTTPRequest &request, unsigned int type=HANDLER_PROPERTY_ALL) const
| Returns a string-valued property.
std::pair< bool, unsigned int > | getUnsignedInt (const char *name, const xmltooling::HTTPRequest &request, unsigned int type=HANDLER_PROPERTY_ALL) const
| Returns an unsigned integer-valued property.
std::pair< bool, int > | getInt (const char *name, const xmltooling::HTTPRequest &request, unsigned int type=HANDLER_PROPERTY_ALL) const
| Returns an integer-valued property.
std::pair< bool, bool > | getBool (const char *name, const char *ns=nullptr) const
| Returns a boolean-valued property.
std::pair< bool, const char * > | getString (const char *name, const char *ns=nullptr) const
| Returns a string-valued property.
std::pair< bool, unsigned int > | getUnsignedInt (const char *name, const char *ns=nullptr) const
| Returns an unsigned integer-valued property.
std::pair< bool, int > | getInt (const char *name, const char *ns=nullptr) const
| Returns an integer-valued property.
Protected Member Functions inherited from shibsp::Handler
virtual void | cleanRelayState (const Application &application, const xmltooling::HTTPRequest &request, xmltooling::HTTPResponse &response) const
| Prevents unused relay state from building up by cleaning old state from the client.
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 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.

## Additional Inherited Members

Protected Types inherited from shibsp::AbstractHandler
enum | PropertySourceTypes { HANDLER_PROPERTY_REQUEST = 1 , HANDLER_PROPERTY_MAP = 2 , HANDLER_PROPERTY_FIXED = 4 , HANDLER_PROPERTY_ALL = 255 }
| Bitmask of property sources to read from (request query parameter, request mapper, fixed handler property).
Protected Attributes inherited from shibsp::AbstractHandler
xmltooling::logging::Category & | m_log
| Logging object.

## Detailed Description

Pluggable runtime functionality that is protected by simple access control.

## Constructor & Destructor Documentation

## SecuredHandler()

shibsp::SecuredHandler::SecuredHandler | ( | const xercesc::DOMElement * | e,
|  | xmltooling::logging::Category & | log,
|  | const char * | aclProperty = "acl",
|  | const char * | defaultACL = nullptr,
|  | xercesc::DOMNodeFilter * | filter = nullptr,
|  | const Remapper * | remapper = nullptr )

protected

Constructor.

Parameters

  e | DOM element to load as property set
  log | logging category to use
  aclProperty | name of IP/CIDR ACL property
  defaultACL | IP/CIDR ACL to apply if no acl property is set
  filter | optional filter controls what child elements to include as nested PropertySets
  remapper | optional property rename mapper for legacy property support

## Member Function Documentation

## run()

std::pair< bool, long > shibsp::SecuredHandler::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

  request | SP request context
  isHandler | true 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.

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

- shibsp/handler/SecuredHandler.h