From c1bd33fb5e0ca2304c997de168513de41f4ef0ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaime=20P=C3=A9rez=20Crespo?= <jaime.perez@uninett.no>
Date: Fri, 17 Jan 2014 15:38:41 +0000
Subject: [PATCH] Cleanup
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3323 44740490-163a-0410-bde0-09ae8108e29a
---
www/saml2/idp/initSLO.php | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/www/saml2/idp/initSLO.php b/www/saml2/idp/initSLO.php
index babcd4bdd..d6b23adc3 100644
--- a/www/saml2/idp/initSLO.php
+++ b/www/saml2/idp/initSLO.php
@@ -1,26 +1,16 @@
<?php
-
require_once('../../_include.php');
-$config = SimpleSAML_Configuration::getInstance();
$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
+$idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
+$idp = SimpleSAML_IdP::getById('saml2:' . $idpEntityId);
SimpleSAML_Logger::info('SAML2.0 - IdP.initSLO: Accessing SAML 2.0 IdP endpoint init Single Logout');
-if (!$config->getBoolean('enable.saml20-idp', false)) {
- throw new SimpleSAML_Error_Error('NOACCESS');
-}
-
-
if (!isset($_GET['RelayState'])) {
throw new SimpleSAML_Error_Error('NORELAYSTATE');
}
-$returnTo = $_GET['RelayState'];
-
-$slo = $metadata->getGenerated('SingleLogoutService', 'saml20-idp-hosted');
-
-/* We turn processing over to the SingleLogoutService script. */
-SimpleSAML_Utilities::redirect($slo, array('ReturnTo' => $returnTo));
-
-?>
\ No newline at end of file
+$returnTo = (string)$_GET['RelayState'];
+$idp->doLogoutRedirect($returnTo);
+assert('FALSE');
\ No newline at end of file
--
GitLab