ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
saml1-acs.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4$cookie_path = dirname(str_replace($_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF']));
5
6$_GET['client_id'] = substr(rtrim($_SERVER['PATH_INFO'], '/'), strrpos($_SERVER['PATH_INFO'], '/') + 1);
7$_SERVER['PATH_INFO'] = substr($_SERVER['PATH_INFO'], 0, strrpos(rtrim($_SERVER['PATH_INFO'], '/'), '/'));
8
9chdir(dirname(__FILE__));
10
12
13$i = 0;
14while (!file_exists($ilias_main_directory . 'ilias.ini.php') && $i < 20) {
15 $ilias_main_directory .= '../';
16 ++$i;
17
18 $cookie_path = dirname($cookie_path);
19}
21
22if (!file_exists(getcwd() . '/ilias.ini.php')) {
23 die('Please ensure ILIAS is installed!');
24}
25
26$cookie_path .= (!preg_match("/[\/|\\\\]$/", $cookie_path)) ? "/" : "";
27
28if (isset($_GET["client_id"])) {
29 if ($cookie_path == "\\") {
30 $cookie_path = '/';
31 }
32
33 setcookie('ilClientId', $_GET['client_id'], 0, $cookie_path, '');
34 $_COOKIE['ilClientId'] = $_GET['client_id'];
35}
36define('IL_COOKIE_PATH', $cookie_path);
37
38require_once 'Services/Context/classes/class.ilContext.php';
40
41require_once 'Services/Init/classes/class.ilInitialisation.php';
43
44require_once 'Services/Saml/classes/class.ilSamlAuthFactory.php';
46$auth = $factory->auth();
47
48require_once 'libs/composer/vendor/simplesamlphp/simplesamlphp/modules/saml/www/sp/saml1-acs.php';
$factory
Definition: saml1-acs.php:45
$cookie_path
Definition: saml1-acs.php:4
$auth
Definition: saml1-acs.php:46
$i
Definition: saml1-acs.php:13
$_SERVER['PATH_INFO']
Definition: saml1-acs.php:7
$_GET['client_id']
Definition: saml1-acs.php:6
$ilias_main_directory
Definition: saml1-acs.php:11
$_COOKIE['client_id']
Definition: server.php:9
An exception for terminatinating execution or to throw for unit testing.
static init($a_type)
Init context by type.
const CONTEXT_SAML
static initILIAS()
ilias initialisation
Class ilSamlAuthFactory.