ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
shib_login.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
12 // Load all the IILIAS stuff
13 require_once "include/inc.header.php";
14 
15 if (!$_SERVER['HTTP_SHIB_APPLICATION_ID'] && !$_SERVER['Shib-Application-ID'])
16 {
17  $message = "This file must be protected by Shibboleth, otherwise you cannot use Shibboleth authentication! Consult the <a href=\"Services/AuthShibboleth/README.SHIBBOLETH.txt\">documentation</a> on how to configure Shibboleth authentication properly.";
18  $ilias->raiseError($message,$ilias->error_obj->WARNING);
19 }
20 
21 // Check if all the essential attributes are available
22 if (
23  !$_SERVER[$ilias->getSetting('shib_login')]
24  || !$_SERVER[$ilias->getSetting('shib_firstname')]
25  || !$_SERVER[$ilias->getSetting('shib_lastname')]
26  || !$_SERVER[$ilias->getSetting('shib_email')]
27  )
28 {
29  $message = "ILIAS needs at least the attributes '".$ilias->getSetting('shib_login')."', '".$ilias->getSetting('shib_firstname')."', '".$ilias->getSetting('shib_lastname')."' and '".$ilias->getSetting('shib_email')."' to work properly !\n<br>Please consult the <a href=\"README.SHIBBOLETH.txt\">documentation</a> on how to configure Shibboleth authentication properly.";
30 
31  $ilias->raiseError($message,$ilias->error_obj->WARNING);
32 }
33 
34 #global $ilAuth;
35 
36 // Shibboleth login
37 #if (!empty($_SERVER[$ilias->getSetting("shib_login")]))
38 #{
39 # $ilAuth->login();
40 #}
41 
42 // We only get here if we didn't login successfully
43 ilUtil::redirect("login.php");
44 ?>