From ee4ea958ea8011a4d4a1ec32f0d06dc46e0239e1 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Tue, 10 Jul 2012 18:40:42 +0000 Subject: [PATCH] https://issues.shibboleth.net/jira/browse/SSPCPP-469 --- msi/WiX/MergeModules/OpenSAML-schemas.wxs | 3 +++ shibsp/handler/impl/SAML2LogoutInitiator.cpp | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/msi/WiX/MergeModules/OpenSAML-schemas.wxs b/msi/WiX/MergeModules/OpenSAML-schemas.wxs index db9d8ec..b97ae4f 100644 --- a/msi/WiX/MergeModules/OpenSAML-schemas.wxs +++ b/msi/WiX/MergeModules/OpenSAML-schemas.wxs @@ -180,6 +180,9 @@ + + + diff --git a/shibsp/handler/impl/SAML2LogoutInitiator.cpp b/shibsp/handler/impl/SAML2LogoutInitiator.cpp index 7ae8f39..a97e1e8 100644 --- a/shibsp/handler/impl/SAML2LogoutInitiator.cpp +++ b/shibsp/handler/impl/SAML2LogoutInitiator.cpp @@ -101,6 +101,7 @@ namespace shibsp { return e; } + bool m_async; vector m_bindings; map< string,boost::shared_ptr > m_encoders; #endif @@ -119,6 +120,9 @@ namespace shibsp { SAML2LogoutInitiator::SAML2LogoutInitiator(const DOMElement* e, const char* appId) : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".LogoutInitiator.SAML2")), m_appId(appId), m_protocol(samlconstants::SAML20P_NS) +#ifndef SHIBSP_LITE + ,m_async(true) +#endif { // If Location isn't set, defer initialization until the setParent call. pair loc = getString("Location"); @@ -146,6 +150,9 @@ void SAML2LogoutInitiator::init(const char* location) #ifndef SHIBSP_LITE if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) { + pair async = getBool("asynchronous"); + m_async = !async.first || async.second; + string dupBindings; pair outgoing = getString("outgoingBindings"); if (outgoing.first) { @@ -523,6 +530,11 @@ auto_ptr SAML2LogoutInitiator::buildRequest( msg->setID(SAMLConfig::getConfig().generateIdentifier()); msg->setIssueInstant(time(nullptr)); + if (m_async) { + msg->setExtensions(saml2p::ExtensionsBuilder::buildExtensions()); + msg->getExtensions()->getUnknownXMLObjects().push_back(AsynchronousBuilder::buildAsynchronous()); + } + return msg; } -- 2.1.4