) const;
/**
- * Sends a response template to the user agent informing it of the results of a logout attempt.
- *
- * @param application the Application to use in determining the logout template
- * @param response the HTTP response to use
- * @param local true iff the logout operation was local to the SP, false iff global
- * @param status optional logoutStatus key value to add to template
- */
- std::pair<bool,long> sendLogoutPage(
- const Application& application, xmltooling::HTTPResponse& response, bool local=true, const char* status=NULL
- ) const;
-
- /**
* Perform back-channel logout notifications for an Application.
*
* @param application the Application to notify
bool notifyBackChannel(
const Application& application, const char* requestURL, const std::vector<std::string>& sessions, bool local
) const;
+
+ /**
+ * Sends a response template to the user agent informing it of the results of a logout attempt.
+ *
+ * @param application the Application to use in determining the logout template
+ * @param response the HTTP response to use
+ * @param local true iff the logout operation was local to the SP, false iff global
+ * @param status optional logoutStatus key value to add to template
+ */
+ std::pair<bool,long> sendLogoutPage(
+ const Application& application, xmltooling::HTTPResponse& response, bool local=true, const char* status=NULL
+ ) const;
};
#if defined (_MSC_VER)
};
ChainingLogoutInitiator::ChainingLogoutInitiator(const DOMElement* e, const char* appId)
- : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".LogoutInitiator"), &g_LINFilter)
+ : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".LogoutInitiator.Chaining"), &g_LINFilter)
{
SPConfig& conf = SPConfig::getConfig();
};
ChainingSessionInitiator::ChainingSessionInitiator(const DOMElement* e, const char* appId)
- : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".SessionInitiator"), &g_SINFilter)
+ : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".SessionInitiator.Chaining"), &g_SINFilter)
{
SPConfig& conf = SPConfig::getConfig();
};
LocalLogoutInitiator::LocalLogoutInitiator(const DOMElement* e, const char* appId)
- : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".LogoutInitiator")), m_appId(appId)
+ : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".LogoutInitiator.Local")), m_appId(appId)
{
pair<bool,const char*> loc = getString("Location");
if (loc.first) {
return sendLogoutPage(request.getApplication(), request, true, "Partial logout failure.");
}
request.getServiceProvider().getSessionCache()->remove(session_id, request.getApplication());
+
+ // Clear the cookie.
+ pair<string,const char*> shib_cookie=request.getApplication().getCookieNameProps("_shibsession_");
+ request.setCookie(shib_cookie.first.c_str(), shib_cookie.second);
}
return sendLogoutPage(request.getApplication(), request, true, "Logout was successful.");
// This is returning from a front-channel notification, so we have to do the back-channel and then
// respond. To do that, we need state from the original request.
if (!request.getParameter("entityID")) {
- if (session_id)
+ if (session_id) {
cache->remove(session_id, application);
+ // Clear the cookie.
+ pair<string,const char*> shib_cookie=application.getCookieNameProps("_shibsession_");
+ response.setCookie(shib_cookie.first.c_str(), shib_cookie.second);
+ }
throw FatalProfileException("Application notification loop did not return entityID for LogoutResponse.");
}
catch (exception& ex) {
m_log.error("error removing session (%s): %s", session_id, ex.what());
}
+
+ // Clear the cookie.
+ pair<string,const char*> shib_cookie=application.getCookieNameProps("_shibsession_");
+ response.setCookie(shib_cookie.first.c_str(), shib_cookie.second);
}
else {
worked1 = worked2 = true;
catch (exception& ex) {
m_log.error("error removing active session (%s): %s", session_id, ex.what());
}
+
+ // Clear the cookie.
+ pair<string,const char*> shib_cookie=application.getCookieNameProps("_shibsession_");
+ response.setCookie(shib_cookie.first.c_str(), shib_cookie.second);
}
return sendResponse(
};
SAML2LogoutInitiator::SAML2LogoutInitiator(const DOMElement* e, const char* appId)
- : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".LogoutInitiator")), m_appId(appId),
+ : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".LogoutInitiator.SAML2")), m_appId(appId),
#ifndef SHIBSP_LITE
m_outgoing(NULL),
#endif
return sendLogoutPage(application, response, true, "Partial logout failure.");
}
+ // Clear the cookie.
+ pair<string,const char*> shib_cookie=application.getCookieNameProps("_shibsession_");
+ response.setCookie(shib_cookie.first.c_str(), shib_cookie.second);
+
#ifndef SHIBSP_LITE
pair<bool,long> ret = make_pair(false,0);
try {
};
SAML2SessionInitiator::SAML2SessionInitiator(const DOMElement* e, const char* appId)
- : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".SessionInitiator")), m_appId(appId)
+ : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".SessionInitiator.SAML2")), m_appId(appId)
{
#ifndef SHIBSP_LITE
m_outgoing=NULL;
{
public:
SAMLDSSessionInitiator(const DOMElement* e, const char* appId)
- : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".SessionInitiator")), m_url(NULL), m_returnParam(NULL) {
+ : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".SessionInitiator.SAMLDS")), m_url(NULL), m_returnParam(NULL) {
pair<bool,const char*> url = getString("URL");
if (!url.first)
throw ConfigurationException("SAMLDS SessionInitiator requires a URL property.");
{
public:
Shib1SessionInitiator(const DOMElement* e, const char* appId)
- : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".SessionInitiator")), m_appId(appId) {
+ : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".SessionInitiator.Shib1")), m_appId(appId) {
// If Location isn't set, defer address registration until the setParent call.
pair<bool,const char*> loc = getString("Location");
if (loc.first) {
{
public:
WAYFSessionInitiator(const DOMElement* e, const char* appId)
- : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".SessionInitiator")), m_url(NULL) {
+ : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".SessionInitiator.WAYF")), m_url(NULL) {
pair<bool,const char*> url = getString("URL");
if (!url.first)
throw ConfigurationException("WAYF SessionInitiator requires a URL property.");