diff --git a/modules/saml/www/sp/metadata.php b/modules/saml/www/sp/metadata.php index 361037c1f368f48dd1a3bb4ab39cd39b4900b05f..541154d4ee5a83a8ed93d8f16dcbdf98cfa5f3a5 100644 --- a/modules/saml/www/sp/metadata.php +++ b/modules/saml/www/sp/metadata.php @@ -34,6 +34,14 @@ $slo->Binding = SAML2_Const::BINDING_HTTP_REDIRECT; $slo->Location = SimpleSAML_Module::getModuleURL('saml/sp/saml2-logout.php/' . $sourceId); $sp->SingleLogoutService[] = $slo; +$store = SimpleSAML_Store::getInstance(); +if ($store instanceof SimpleSAML_Store_SQL) { + /* We can properly support SOAP logout. */ + $slo = new SAML2_XML_md_EndpointType(); + $slo->Binding = SAML2_Const::BINDING_SOAP; + $slo->Location = SimpleSAML_Module::getModuleURL('saml/sp/saml2-logout.php/' . $sourceId); + $sp->SingleLogoutService[] = $slo; +} $acs = new SAML2_XML_md_IndexedEndpointType(); $acs->index = 0; diff --git a/modules/saml/www/sp/saml2-logout.php b/modules/saml/www/sp/saml2-logout.php index 50dd62b3a39c37f514416ccd8826382f182fe76d..bf3cb05ac926ba6ab5bf33ac919d320c80e75512 100644 --- a/modules/saml/www/sp/saml2-logout.php +++ b/modules/saml/www/sp/saml2-logout.php @@ -84,8 +84,6 @@ if ($message instanceof SAML2_LogoutResponse) { $lr->setRelayState($message->getRelayState()); $lr->setInResponseTo($message->getId()); - $binding = new SAML2_HTTPRedirect(); - $binding->setDestination(sspmod_saml_Message::getDebugDestination()); $binding->send($lr); } else { throw new SimpleSAML_Error_BadRequest('Unknown message received on logout endpoint: ' . get_class($message));