From e7fe6b2f3340391867c63b296cf30f34ca3e376e Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Mon, 20 Sep 2010 12:13:58 +0000 Subject: [PATCH] saml:SP: Support SOAP LogoutRequest. When using the new SQL datastore, we can support SOAP logout. Fixes issue 24. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2558 44740490-163a-0410-bde0-09ae8108e29a --- modules/saml/www/sp/metadata.php | 8 ++++++++ modules/saml/www/sp/saml2-logout.php | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/saml/www/sp/metadata.php b/modules/saml/www/sp/metadata.php index 361037c1f..541154d4e 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 50dd62b3a..bf3cb05ac 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)); -- GitLab