PHP Classes

File: web/SSO/SAML/saml2/idp/SingleLogoutService.php

Recommend this page to a friend!
  Classes of william amed   Raptor 2   web/SSO/SAML/saml2/idp/SingleLogoutService.php   Download  
File: web/SSO/SAML/saml2/idp/SingleLogoutService.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 893 bytes
 

Contents

Class file image Download
<?php

/**
 * This SAML 2.0 endpoint can receive incoming LogoutRequests. It will also send LogoutResponses,
 * and LogoutRequests and also receive LogoutResponses. It is implemeting SLO at the SAML 2.0 IdP.
 *
 * @author Andreas Åkre Solberg, UNINETT AS. <andreas.solberg@uninett.no>
 * @package simpleSAMLphp
 */

require_once('../../_include.php');

SimpleSAML_Logger::info('SAML2.0 - IdP.SingleLogoutService: Accessing SAML 2.0 IdP endpoint SingleLogoutService');

$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
$idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
$idp = SimpleSAML_IdP::getById('saml2:' . $idpEntityId);

if (isset(
$_REQUEST['ReturnTo'])) {
   
$idp->doLogoutRedirect(SimpleSAML_Utilities::checkURLAllowed((string)$_REQUEST['ReturnTo']));
} else {
   
sspmod_saml_IdP_SAML2::receiveLogoutMessage($idp);
}
assert('FALSE');