#include <shibsp/handler/LogoutHandler.h>
Public Member Functions | |
std::pair< bool, long > | run (SPRequest &request, bool isHandler=true) const |
The base method will iteratively attempt front-channel notification of logout of the current session, and after the final round trip will perform back-channel notification. | |
void | receive (DDF &in, std::ostream &out) |
A remoted procedure that will perform any necessary back-channel notifications. | |
Protected Member Functions | |
std::pair< bool, long > | notifyFrontChannel (const Application &application, const xmltooling::HTTPRequest &request, xmltooling::HTTPResponse &response, const std::map< std::string, std::string > *params=nullptr) const |
Perform front-channel logout notifications for an Application. | |
bool | notifyBackChannel (const Application &application, const char *requestURL, const std::vector< std::string > &sessions, bool local) const |
Perform back-channel logout notifications for an Application. | |
std::pair< bool, long > | sendLogoutPage (const Application &application, const xmltooling::HTTPRequest &request, xmltooling::HTTPResponse &response, bool local=true, const char *status=nullptr) const |
std::pair< bool, long > | sendLogoutPage (const Application &application, const xmltooling::HTTPRequest &request, xmltooling::HTTPResponse &response, const char *type) const |
Sends a response template to the user agent informing it of the results of a logout attempt. | |
virtual LogoutEvent * | newLogoutEvent (const Application &application, const xmltooling::HTTPRequest *request=nullptr, const Session *session=nullptr) const |
Creates a new LogoutEvent for the event log. | |
Protected Attributes | |
bool | m_initiator |
Flag indicating whether the subclass is acting as a LogoutInitiator. | |
std::vector< std::string > | m_preserve |
Array of query string parameters to preserve across front-channel notifications, if present. |
std::pair<bool,long> shibsp::LogoutHandler::run | ( | SPRequest & | request, | |
bool | isHandler = true | |||
) | const [virtual] |
The base method will iteratively attempt front-channel notification of logout of the current session, and after the final round trip will perform back-channel notification.
Nothing will be done unless the handler detects that it is the "top" level logout handler. If the method returns false, then the specialized class should perform its work assuming that the notifications are completed.
Note that the current session is NOT removed from the cache.
request | SP request context | |
isHandler | true iff executing in the context of a direct handler invocation |
Implements shibsp::Handler.
void shibsp::LogoutHandler::receive | ( | DDF & | in, | |
std::ostream & | out | |||
) | [virtual] |
A remoted procedure that will perform any necessary back-channel notifications.
The input structure must contain an "application_id" member, and a "sessions" list containing the session keys, along with an integer member called "notify" with a value of 1.
Implements shibsp::Remoted.
std::pair<bool,long> shibsp::LogoutHandler::notifyFrontChannel | ( | const Application & | application, | |
const xmltooling::HTTPRequest & | request, | |||
xmltooling::HTTPResponse & | response, | |||
const std::map< std::string, std::string > * | params = nullptr | |||
) | const [protected] |
Perform front-channel logout notifications for an Application.
application | the Application to notify | |
request | last request from browser | |
response | response to use for next notification | |
params | map of query string parameters to preserve across this notification |
bool shibsp::LogoutHandler::notifyBackChannel | ( | const Application & | application, | |
const char * | requestURL, | |||
const std::vector< std::string > & | sessions, | |||
bool | local | |||
) | const [protected] |
Perform back-channel logout notifications for an Application.
application | the Application to notify | |
requestURL | requestURL that resulted in method call | |
sessions | array of session keys being logged out | |
local | true iff the logout operation is local to the SP, false iff global |
std::pair<bool,long> shibsp::LogoutHandler::sendLogoutPage | ( | const Application & | application, | |
const xmltooling::HTTPRequest & | request, | |||
xmltooling::HTTPResponse & | response, | |||
bool | local = true , |
|||
const char * | status = nullptr | |||
) | const [protected] |
application | the Application to use in determining the logout template | |
request | the HTTP client request to supply to the template | |
response | the HTTP response to use | |
local | true iff the logout operation was local to the SP, false iff global | |
status | optional logoutStatus key value to add to template |
std::pair<bool,long> shibsp::LogoutHandler::sendLogoutPage | ( | const Application & | application, | |
const xmltooling::HTTPRequest & | request, | |||
xmltooling::HTTPResponse & | response, | |||
const char * | type | |||
) | const [protected] |
Sends a response template to the user agent informing it of the results of a logout attempt.
application | the Application to use in determining the logout template | |
request | the HTTP client request to supply to the template | |
response | the HTTP response to use | |
type | designates the prefix of logout template name to use |
virtual LogoutEvent* shibsp::LogoutHandler::newLogoutEvent | ( | const Application & | application, | |
const xmltooling::HTTPRequest * | request = nullptr , |
|||
const Session * | session = nullptr | |||
) | const [protected, virtual] |
Creates a new LogoutEvent for the event log.
application | the Application associated with the event | |
request | the HTTP client request associated with the event, or nullptr | |
session | the user session associated with the event, or nullptr |
bool shibsp::LogoutHandler::m_initiator [protected] |
Flag indicating whether the subclass is acting as a LogoutInitiator.
std::vector<std::string> shibsp::LogoutHandler::m_preserve [protected] |
Array of query string parameters to preserve across front-channel notifications, if present.