ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
saml2-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
9
chdir(dirname(__FILE__));
10
11
$ilias_main_directory
=
'./'
;
12
13
$i
= 0;
14
while
(!file_exists(
$ilias_main_directory
.
'ilias.ini.php'
) &&
$i
< 20)
15
{
16
$ilias_main_directory
.=
'../'
;
17
++
$i
;
18
19
$cookie_path
= dirname(
$cookie_path
);
20
}
21
chdir(
$ilias_main_directory
);
22
23
if
(!file_exists(getcwd() .
'/ilias.ini.php'
))
24
{
25
die(
'Please ensure ILIAS is installed!'
);
26
}
27
28
$cookie_path
.= (!preg_match(
"/[\/|\\\\]$/"
,
$cookie_path
)) ?
"/"
:
""
;
29
30
if
(isset(
$_GET
[
"client_id"
]))
31
{
32
if
(
$cookie_path
==
"\\"
)
33
{
34
$cookie_path
=
'/'
;
35
}
36
37
setcookie(
'ilClientId'
,
$_GET
[
'client_id'
], 0,
$cookie_path
,
''
);
38
$_COOKIE
[
'ilClientId'
] =
$_GET
[
'client_id'
];
39
}
40
define(
'IL_COOKIE_PATH'
,
$cookie_path
);
41
42
require_once
'Services/Context/classes/class.ilContext.php'
;
43
ilContext::init
(
ilContext::CONTEXT_SAML
);
44
45
require_once
'Services/Init/classes/class.ilInitialisation.php'
;
46
ilInitialisation::initILIAS
();
47
48
require_once
'Services/Saml/classes/class.ilSamlAuthFactory.php'
;
49
$factory
=
new
ilSamlAuthFactory
();
50
$auth
=
$factory
->auth();
51
52
require_once
'libs/composer/vendor/simplesamlphp/simplesamlphp/modules/saml/www/sp/saml2-acs.php'
;
$_COOKIE
$_COOKIE['client_id']
Definition:
server.php:9
$factory
$factory
Definition:
saml2-acs.php:49
$cookie_path
$cookie_path
Definition:
saml2-acs.php:4
ilInitialisation\initILIAS
static initILIAS()
ilias initialisation
Definition:
class.ilInitialisation.php:949
ilContext\CONTEXT_SAML
const CONTEXT_SAML
Definition:
class.ilContext.php:36
$_GET
$_GET['client_id']
Definition:
saml2-acs.php:6
$i
$i
Definition:
saml2-acs.php:13
ilContext\init
static init($a_type)
Init context by type.
Definition:
class.ilContext.php:45
$_SERVER
$_SERVER['PATH_INFO']
Definition:
saml2-acs.php:7
$ilias_main_directory
$ilias_main_directory
Definition:
saml2-acs.php:11
ilSamlAuthFactory
Class ilSamlAuthFactory.
Definition:
class.ilSamlAuthFactory.php:7
$auth
$auth
Definition:
saml2-acs.php:50
Services
Saml
lib
saml2-acs.php
Generated on Sat Jan 18 2025 19:01:11 for ILIAS by
1.8.13 (using
Doxyfile
)