19 require_once(
"../vendor/composer/vendor/autoload.php");
20 require_once(
"../artifacts/bootstrap_default.php");
23 $q =
$DIC->http()->wrapper()->query();
27 &&
$q->retrieve(
'action',
$DIC->refinery()->to()->string()) ===
'logout' 32 $GLOBALS[
'DIC'][
'ilAuthSession']->logout();
53 $server =
new SoapServer(
'https://' .
$_SERVER[
'HTTP_HOST'] .
$_SERVER[
'SCRIPT_NAME'] .
'/LogoutNotification.wsdl');
54 $server->addFunction(
"LogoutNotification");
66 header(
'Content-Type: text/xml');
68 $url = filter_var(
"https://{$_SERVER['HTTP_HOST']}/shib_logout.php", FILTER_SANITIZE_URL);
71 <?xml version =
"1.0" encoding =
"UTF-8" ?>
72 <definitions name=
"LogoutNotification" 73 targetNamespace=
"urn:mace:shibboleth:2.0:sp:notify" 74 xmlns:notify=
"urn:mace:shibboleth:2.0:sp:notify" 75 xmlns:soap=
"http://schemas.xmlsoap.org/wsdl/soap/" 76 xmlns=
"http://schemas.xmlsoap.org/wsdl/">
79 <schema targetNamespace=
"urn:mace:shibboleth:2.0:sp:notify" 80 xmlns=
"http://www.w3.org/2000/10/XMLSchema" 81 xmlns:notify=
"urn:mace:shibboleth:2.0:sp:notify">
83 <simpleType name=
"string">
84 <restriction
base=
"string">
85 <minLength value=
"1"/>
89 <element name=
"OK" type=
"notify:OKType"/>
90 <complexType name=
"OKType">
97 <message name=
"getLogoutNotificationRequest">
98 <part name=
"SessionID" type=
"notify:string" />
101 <message name=
"getLogoutNotificationResponse" >
105 <portType name=
"LogoutNotificationPortType">
106 <operation name=
"LogoutNotification">
107 <input message=
"getLogoutNotificationRequest"/>
108 <output message=
"getLogoutNotificationResponse"/>
112 <binding name=
"LogoutNotificationBinding" type=
"notify:LogoutNotificationPortType">
113 <soap:binding style=
"rpc" transport=
"http://schemas.xmlsoap.org/soap/http"/>
114 <operation name=
"LogoutNotification">
115 <soap:operation soapAction=
"urn:xmethods-logout-notification#LogoutNotification"/>
119 <service name=
"LogoutNotificationService">
120 <port name=
"LogoutNotificationPort" binding=
"notify:LogoutNotificationBinding">
121 <soap:address location=
"{$url}"/>
131 function LogoutNotification($SessionID): ?\
SoapFault 141 $q =
"SELECT session_id, data FROM usr_session WHERE expires > 'NOW()'";
149 foreach ($user_session as $user_session_entry) {
151 if (is_array($user_session_entry) && array_key_exists(
'shibboleth_session_id', $user_session_entry) && $user_session_entry[
'shibboleth_session_id'] == $SessionID && !
ilSession::_destroy($session_entry[
'session_id'])
153 return new SoapFault(
'LogoutError',
'Could not delete session entry in database.');
169 $a = preg_split(
"/(\w+)\|/", (
string) $serialized_string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
170 $counter = count(
$a);
171 for ($i = 0; $i < $counter; $i += 2) {
172 $variables[
$a[$i]] = unserialize($a[$i + 1]);
unserializesession($serialized_string)
global $HTTP_RAW_POST_DATA
global $DIC
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static redirect(string $a_script)
static _destroy($a_session_id, ?int $a_closing_context=null, $a_expired_at=null)
Destroy session.
static init(string $a_type)
Init context by type.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
entry_point(string $name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...