ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
shib_login.php
Go to the documentation of this file.
1<?php
2/******************************************************************************
3 *
4 * This file is part of ILIAS, a powerful learning management system.
5 *
6 * ILIAS is licensed with the GPL-3.0, you should have received a copy
7 * of said license along with the source code.
8 *
9 * If this is not the case or you just want to try ILIAS, you'll find
10 * us at:
11 * https://www.ilias.de
12 * https://github.com/ILIAS-eLearning
13 *
14 *****************************************************************************/
16require_once("libs/composer/vendor/autoload.php");
19global $DIC;
20
21$server = $DIC->http()->request()->getServerParams();
22
23if (
24 !isset($server['HTTP_SHIB_APPLICATION_ID'])
25 && !isset($server['Shib-Application-ID'])
26 && !isset($server['REDIRECT_Shib_Application_ID'])
27) {
28 $factory = $DIC->ui()->factory();
29 $message_box = $factory->messageBox()->failure("The file shib_login.php must be protected by Shibboleth, otherwise you cannot use Shibboleth authentication.")->withButtons([
30 $factory->button()->standard('Open Documentation', './Services/AuthShibboleth/README.md')
31 ]);
32
33 $DIC->ui()->mainTemplate()->setContent($DIC->ui()->renderer()->render($message_box));
34 $DIC->ui()->mainTemplate()->printToStdout();
35} else {
36 // authentication is done here ->
37 $DIC->ctrl()->setCmd('doShibbolethAuthentication');
38 $DIC->ctrl()->callBaseClass(ilStartUpGUI::class);
39}
40
const CONTEXT_SHIBBOLETH
static init(string $a_type)
Init context by type.
static initILIAS()
ilias initialisation
$factory
Definition: metadata.php:75
global $DIC
Definition: shib_login.php:19
$server
Definition: shib_login.php:21