ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
saml2-logout.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
$ilias_main_directory
.=
'../'
;
16
++
$i
;
17
18
$cookie_path
= dirname(
$cookie_path
);
19
}
20
chdir(
$ilias_main_directory
);
21
22
if
(!file_exists(getcwd() .
'/ilias.ini.php'
)) {
23
die(
'Please ensure ILIAS is installed!'
);
24
}
25
26
$cookie_path
.= (!preg_match(
"/[\/|\\\\]$/"
,
$cookie_path
)) ?
"/"
:
""
;
27
28
if
(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
}
36
define(
'IL_COOKIE_PATH'
,
$cookie_path
);
37
38
require_once
'Services/Context/classes/class.ilContext.php'
;
39
ilContext::init
(
ilContext::CONTEXT_SAML
);
40
41
require_once
'Services/Init/classes/class.ilInitialisation.php'
;
42
ilInitialisation::initILIAS
();
43
44
require_once
'Services/Saml/classes/class.ilSamlAuthFactory.php'
;
45
$factory
=
new
ilSamlAuthFactory
();
46
$auth
=
$factory
->auth();
47
48
ilSession::setClosingContext
(
ilSession::SESSION_CLOSE_USER
);
49
$GLOBALS
[
'DIC'
][
'ilAuthSession'
]->logout();
50
51
$GLOBALS
[
'ilAppEventHandler'
]->raise(
52
'Services/Authentication'
,
53
'afterLogout'
,
54
array(
55
'username'
=>
$GLOBALS
[
'DIC'
]->
user
()->getLogin()
56
)
57
);
58
59
require_once
'libs/composer/vendor/simplesamlphp/simplesamlphp/modules/saml/www/sp/saml2-logout.php'
;
$cookie_path
$cookie_path
Definition:
saml2-logout.php:4
$_COOKIE
$_COOKIE['client_id']
Definition:
server.php:9
$auth
$auth
Definition:
saml2-logout.php:46
$i
$i
Definition:
saml2-logout.php:13
$factory
$factory
Definition:
saml2-logout.php:45
user
user()
Definition:
user.php:4
ilInitialisation\initILIAS
static initILIAS()
ilias initialisation
Definition:
class.ilInitialisation.php:996
ilContext\CONTEXT_SAML
const CONTEXT_SAML
Definition:
class.ilContext.php:36
ilSession\SESSION_CLOSE_USER
const SESSION_CLOSE_USER
Definition:
class.ilSession.php:40
$_GET
$_GET['client_id']
Definition:
saml2-logout.php:6
ilContext\init
static init($a_type)
Init context by type.
Definition:
class.ilContext.php:45
ilSession\setClosingContext
static setClosingContext($a_context)
set closing context (for statistics)
Definition:
class.ilSession.php:462
$_SERVER
$_SERVER['PATH_INFO']
Definition:
saml2-logout.php:7
ilSamlAuthFactory
Class ilSamlAuthFactory.
Definition:
class.ilSamlAuthFactory.php:7
php
$GLOBALS
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
Definition:
module.tag.xmp.php:702
$ilias_main_directory
$ilias_main_directory
Definition:
saml2-logout.php:11
Services
Saml
lib
saml2-logout.php
Generated on Thu Jan 16 2025 19:01:56 for ILIAS by
1.8.13 (using
Doxyfile
)