ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
SingleLogoutService.php
Go to the documentation of this file.
1<?php
2
11require_once('../../_include.php');
12
13SimpleSAML\Logger::info('SAML2.0 - IdP.SingleLogoutService: Accessing SAML 2.0 IdP endpoint SingleLogoutService');
14
16$idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
18
19if (isset($_REQUEST['ReturnTo'])) {
20 $idp->doLogoutRedirect(\SimpleSAML\Utils\HTTP::checkURLAllowed((string) $_REQUEST['ReturnTo']));
21} else {
22 try {
24 } catch (Exception $e) { // TODO: look for a specific exception
25 /*
26 * This is dirty. Instead of checking the message of the exception, \SAML2\Binding::getCurrentBinding() should
27 * throw an specific exception when the binding is unknown, and we should capture that here
28 */
29 if ($e->getMessage() === 'Unable to find the current binding.') {
30 throw new SimpleSAML_Error_Error('SLOSERVICEPARAMS', $e, 400);
31 } else {
32 throw $e; // do not ignore other exceptions!
33 }
34 }
35}
36assert('FALSE');
An exception for terminatinating execution or to throw for unit testing.
static info($string)
Definition: Logger.php:201
static getById($id)
Retrieve an IdP by ID.
Definition: IdP.php:131
static getMetadataHandler()
This function retrieves the current instance of the metadata handler.
static receiveLogoutMessage(SimpleSAML_IdP $idp)
Receive a logout message.
Definition: SAML2.php:536
Attribute-related utility methods.