shibboleth-2.3.1

shibsp::AbstractHandler Class Reference

Base class for handlers based on a DOMPropertySet. More...

#include <shibsp/handler/AbstractHandler.h>

Inheritance diagram for shibsp::AbstractHandler:
shibsp::Handler shibsp::DOMPropertySet shibsp::PropertySet shibsp::PropertySet shibsp::AssertionConsumerService

List of all members.

Protected Member Functions

 AbstractHandler (const xercesc::DOMElement *e, xmltooling::logging::Category &log, xercesc::DOMNodeFilter *filter=NULL, const std::map< std::string, std::string > *remapper=NULL)
 Constructor.
virtual void checkError (const xmltooling::XMLObject *response, const opensaml::saml2md::RoleDescriptor *role=NULL) 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=NULL, const char *msg=NULL) 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, bool signIfPossible=false) const
 Encodes and sends SAML 2.0 message, optionally signing it in the process.
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.
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 &httpResponse, const char *url, DDF &postData) const
 Post a redirect response with post data.

Protected Attributes

xmltooling::logging::Category & m_log
 Logging object.
xmltooling::auto_ptr_char m_configNS
 Configuration namespace for custom properties.

Detailed Description

Base class for handlers based on a DOMPropertySet.


Constructor & Destructor Documentation

shibsp::AbstractHandler::AbstractHandler ( const xercesc::DOMElement *  e,
xmltooling::logging::Category &  log,
xercesc::DOMNodeFilter *  filter = NULL,
const std::map< std::string, std::string > *  remapper = NULL 
) [protected]

Constructor.

Parameters:
eDOM element to load as property set.
loglogging category to use
filteroptional filter controls what child elements to include as nested PropertySets
remapperoptional map of property rename rules for legacy property support

Member Function Documentation

virtual void shibsp::AbstractHandler::checkError ( const xmltooling::XMLObject *  response,
const opensaml::saml2md::RoleDescriptor *  role = NULL 
) const [protected, virtual]

Examines a protocol response message for errors and raises an annotated exception if an error is found.

The base class version understands SAML 1.x and SAML 2.0 responses.

Parameters:
responsea response message of some known protocol
roleissuer of message
void shibsp::AbstractHandler::fillStatus ( opensaml::saml2p::StatusResponseType &  response,
const XMLCh *  code,
const XMLCh *  subcode = NULL,
const char *  msg = NULL 
) const [protected]

Prepares Status information in a SAML 2.0 response.

Parameters:
responseSAML 2.0 response message
codeSAML status code
subcodeoptional SAML substatus code
msgoptional message to pass back
virtual void shibsp::AbstractHandler::preservePostData ( const Application application,
const xmltooling::HTTPRequest &  request,
xmltooling::HTTPResponse &  response,
const char *  relayState 
) const [protected, virtual]

Implements a mechanism to preserve form post data.

Parameters:
applicationthe associated Application
requestincoming HTTP request
responseoutgoing HTTP response
relayStaterelay state information attached to current sequence, if any
virtual void shibsp::AbstractHandler::preserveRelayState ( const Application application,
xmltooling::HTTPResponse &  response,
std::string &  relayState 
) const [protected, virtual]

Implements various mechanisms to preserve RelayState, such as cookies or StorageService-backed keys.

If a supported mechanism can be identified, the input parameter will be replaced with a suitable state key.

Parameters:
applicationthe associated Application
responseoutgoing HTTP response
relayStateRelayState token to supply with message
virtual DDF shibsp::AbstractHandler::recoverPostData ( const Application application,
const xmltooling::HTTPRequest &  request,
xmltooling::HTTPResponse &  response,
const char *  relayState 
) const [protected, virtual]

Implements storage service and cookie mechanism to recover PostData.

If a supported mechanism can be identified, the return value will be the recovered state information.

Parameters:
applicationthe associated Application
requestincoming HTTP request
responseoutgoing HTTP response
relayStaterelay state information attached to current sequence, if any
Returns:
recovered form post data associated with request as a DDF list of string members
virtual void shibsp::AbstractHandler::recoverRelayState ( const Application application,
const xmltooling::HTTPRequest &  request,
xmltooling::HTTPResponse &  response,
std::string &  relayState,
bool  clear = true 
) const [protected, virtual]

Implements various mechanisms to recover RelayState, such as cookies or StorageService-backed keys.

If a supported mechanism can be identified, the input parameter will be replaced with the recovered state information.

Parameters:
applicationthe associated Application
requestincoming HTTP request
responseoutgoing HTTP response
relayStateRelayState token supplied with message
cleartrue iff the token state should be cleared
long shibsp::AbstractHandler::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,
bool  signIfPossible = false 
) const [protected]

Encodes and sends SAML 2.0 message, optionally signing it in the process.

If the method returns, the message MUST NOT be freed by the caller.

Parameters:
encoderthe MessageEncoder to use
msgthe message to send
relayStateany RelayState to include with the message
destinationlocation to send message, if not a backchannel response
rolerecipient of message, if known
applicationthe Application sending the message
httpResponsechannel for sending message
signIfPossibletrue iff signing should be attempted regardless of "signing" property
Returns:
the result of sending the message using the encoder
virtual long shibsp::AbstractHandler::sendPostResponse ( const Application application,
xmltooling::HTTPResponse &  httpResponse,
const char *  url,
DDF postData 
) const [protected, virtual]

Post a redirect response with post data.

Parameters:
applicationthe associated Application
responseoutgoing HTTP response
requestincoming HTTP request
urlaction url for the form
postDatalist of parameters to load into the form, as DDF string members

Member Data Documentation

xmltooling::auto_ptr_char shibsp::AbstractHandler::m_configNS [protected]

Configuration namespace for custom properties.

xmltooling::logging::Category& shibsp::AbstractHandler::m_log [protected]

Logging object.


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