ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
cleardiscochoices.php
Go to the documentation of this file.
1<?php
2
3require_once('_include.php');
4
9// The base path for cookies. This should be the installation directory for SimpleSAMLphp.
11$cookiePath = $config->getBasePath();
12
13// We delete all cookies which starts with 'idpdisco_'
14foreach($_COOKIE as $cookieName => $value) {
15 if (substr($cookieName, 0, 9) !== 'idpdisco_') {
16 /* Not a idpdisco cookie. */
17 continue;
18 }
19
20 /* Delete the cookie. We delete it once without the secure flag and once with the secure flag. This
21 * ensures that the cookie will be deleted in any case.
22 */
23 \SimpleSAML\Utils\HTTP::setCookie($cookieName, NULL, array('path' => $cookiePath, 'httponly' => FALSE), FALSE);
24}
25
26
27/* Find where we should go now. */
28if(array_key_exists('ReturnTo', $_REQUEST)) {
30} else {
31 /* Return to the front page if no other destination is given. This is the same as the base cookie path. */
33}
34
35/* Redirect to destination. */
37
$_COOKIE['client_id']
Definition: server.php:9
if(!isset($_REQUEST['ReturnTo'])) $returnTo
Definition: authpage.php:16
An exception for terminatinating execution or to throw for unit testing.
static setCookie($name, $value, $params=null, $throw=true)
Set a cookie.
Definition: HTTP.php:1107
static checkURLAllowed($url, array $trustedSites=null)
Check if a URL is valid and is in our list of allowed URLs.
Definition: HTTP.php:322
static redirectTrustedURL($url, $parameters=array())
This function redirects to the specified URL without performing any security checks.
Definition: HTTP.php:962
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
$config
This page clears the user's IdP discovery choices.
$cookieName