diff --git a/www/saml2/idp/initSLO.php b/www/saml2/idp/initSLO.php index babcd4bddfbba968f09e70e2d3716e19fda1baa3..d6b23adc351ac62e75e4c311dcc770f7d86fdb92 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