ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SingleLogoutService.php
Go to the documentation of this file.
1 <?php
2 
11 require_once('../../_include.php');
12 
13 SimpleSAML\Logger::info('SAML2.0 - IdP.SingleLogoutService: Accessing SAML 2.0 IdP endpoint SingleLogoutService');
14 
16 $idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
18 
19 if (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 }
36 assert(FALSE);
static getMetadataHandler()
This function retrieves the current instance of the metadata handler.
static getById($id)
Retrieve an IdP by ID.
Definition: IdP.php:124
Attribute-related utility methods.
static info($string)
Definition: Logger.php:199
static receiveLogoutMessage(SimpleSAML_IdP $idp)
Receive a logout message.
Definition: SAML2.php:556