ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
saml2-logout.php
Go to the documentation of this file.
1
<?php
2
19
$cookie_path
= dirname(str_replace(
$_SERVER
[
'PATH_INFO'
],
''
,
$_SERVER
[
'PHP_SELF'
]));
20
21
$_GET
[
'client_id'
] = substr(rtrim(
$_SERVER
[
'PATH_INFO'
],
'/'
), strrpos(
$_SERVER
[
'PATH_INFO'
],
'/'
) + 1);
22
$_SERVER
[
'PATH_INFO'
] = substr(
$_SERVER
[
'PATH_INFO'
], 0, strrpos(rtrim(
$_SERVER
[
'PATH_INFO'
],
'/'
),
'/'
));
23
24
chdir(__DIR__);
25
26
$ilias_main_directory
=
'./'
;
27
28
$i
= 0;
29
while
(!is_file(
$ilias_main_directory
.
'ilias.ini.php'
) &&
$i
< 20) {
30
$ilias_main_directory
.=
'../'
;
31
++
$i
;
32
33
$cookie_path
= dirname(
$cookie_path
);
34
}
35
chdir(
$ilias_main_directory
);
36
37
if
(!is_file(getcwd() .
'/ilias.ini.php'
)) {
38
die(
'Please ensure ILIAS is installed!'
);
39
}
40
41
$cookie_path
.= (!preg_match(
"/[\/|\\\\]$/"
,
$cookie_path
)) ?
"/"
:
""
;
42
43
if
(isset(
$_GET
[
"client_id"
])) {
44
if
(
$cookie_path
===
"\\"
) {
45
$cookie_path
=
'/'
;
46
}
47
48
setcookie(
'ilClientId'
,
$_GET
[
'client_id'
], 0,
$cookie_path
,
''
);
49
$_COOKIE
[
'ilClientId'
] =
$_GET
[
'client_id'
];
50
}
51
define(
'IL_COOKIE_PATH'
,
$cookie_path
);
52
53
require_once
'Services/Context/classes/class.ilContext.php'
;
54
ilContext::init
(
ilContext::CONTEXT_SAML
);
55
56
require_once
'Services/Init/classes/class.ilInitialisation.php'
;
57
ilInitialisation::initILIAS
();
58
59
$factory
=
new
ilSamlAuthFactory
();
60
$auth
=
$factory
->auth();
61
62
ilSession::setClosingContext
(
ilSession::SESSION_CLOSE_USER
);
63
$GLOBALS
[
'DIC'
][
'ilAuthSession'
]->logout();
64
65
$GLOBALS
[
'ilAppEventHandler'
]->raise(
66
'Services/Authentication'
,
67
'afterLogout'
,
68
[
69
'username'
=>
$GLOBALS
[
'DIC'
]->
user
()->getLogin(),
70
]
71
);
72
73
require_once
'libs/composer/vendor/simplesamlphp/simplesamlphp/modules/saml/www/sp/saml2-logout.php'
;
$_GET
$_GET['client_id']
Definition:
saml2-logout.php:21
$cookie_path
$cookie_path
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
saml2-logout.php:19
$_SERVER
$_SERVER['PATH_INFO']
Definition:
saml2-logout.php:22
$auth
$auth
Definition:
saml2-logout.php:60
ILIAS\Repository\user
user()
Definition:
trait.GlobalDICDomainServices.php:61
$ilias_main_directory
$ilias_main_directory
Definition:
saml2-logout.php:26
ilInitialisation\initILIAS
static initILIAS()
ilias initialisation
Definition:
class.ilInitialisation.php:1225
ilContext\CONTEXT_SAML
const CONTEXT_SAML
Definition:
class.ilContext.php:47
ilSession\SESSION_CLOSE_USER
const SESSION_CLOSE_USER
Definition:
class.ilSession.php:51
$GLOBALS
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition:
PEAR.php:64
ilSession\setClosingContext
static setClosingContext(int $a_context)
set closing context (for statistics)
Definition:
class.ilSession.php:487
ilContext\init
static init(string $a_type)
Init context by type.
Definition:
class.ilContext.php:52
ilSamlAuthFactory
Class ilSamlAuthFactory.
Definition:
class.ilSamlAuthFactory.php:26
$_COOKIE
$_COOKIE[session_name()]
Definition:
xapitoken.php:54
$factory
$factory
Definition:
saml2-logout.php:59
$i
$i
Definition:
saml2-logout.php:28
Services
Saml
lib
saml2-logout.php
Generated on Wed Sep 3 2025 22:02:39 for ILIAS by
1.8.13 (using
Doxyfile
)