ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilObjAuthSettings.php
Go to the documentation of this file.
1<?php
2/*
3 +-----------------------------------------------------------------------------+
4 | ILIAS open source |
5 +-----------------------------------------------------------------------------+
6 | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7 | |
8 | This program is free software; you can redistribute it and/or |
9 | modify it under the terms of the GNU General Public License |
10 | as published by the Free Software Foundation; either version 2 |
11 | of the License, or (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software |
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 +-----------------------------------------------------------------------------+
22*/
23
33include_once "./Services/Object/classes/class.ilObject.php";
34
36{
43 function __construct($a_id = 0,$a_call_by_reference = true)
44 {
45 $this->type = "auth";
46 parent::__construct($a_id,$a_call_by_reference);
47 }
48
49 function checkAuthLDAP()
50 {
51 $settings = $this->ilias->getAllSettings();
52
53 if (!$settings["ldap_server"] or !$settings["ldap_basedn"] or !$settings["ldap_port"])
54 {
55 return false;
56 }
57
58 $this->ilias->setSetting('ldap_active',true);
59
60 return true;
61 }
62
63 function checkAuthSHIB()
64 {
65 $settings = $this->ilias->getAllSettings();
66
67 if (!$settings["hos_type"] or !$settings["shib_user_default_role"] or !$settings["shib_login"]
68 or !$settings["shib_firstname"] or !$settings["shib_lastname"])
69 {
70 return false;
71 }
72
73 $this->ilias->setSetting('shibboleth_active',true);
74
75 return true;
76 }
77
78 function checkAuthRADIUS()
79 {
80 $settings = $this->ilias->getAllSettings();
81
82 if (!$settings["radius_server"] or !$settings["radius_shared_secret"] or !$settings["radius_port"])
83 {
84 return false;
85 }
86
87 $this->ilias->setSetting('radius_active',true);
88
89 return true;
90 }
91
92 function checkAuthScript()
93 {
94 $settings = $this->ilias->getAllSettings();
95
96 if (!$settings["auth_script_name"])
97 {
98 return false;
99 }
100
101 $this->ilias->setSetting('script_active',true);
102
103 return true;
104 }
105
112 function update()
113 {
114 if (!parent::update())
115 {
116 return false;
117 }
118
119 // put here object specific stuff
120
121 return true;
122 }
123
124
131 function delete()
132 {
133 // always call parent delete function first!!
134 if (!parent::delete())
135 {
136 return false;
137 }
138
139 //put here your module specific stuff
140
141 return true;
142 }
143
144
145} // END class.ilObjAuthSettings
146?>
An exception for terminatinating execution or to throw for unit testing.
Class ilObjAuthSettings.
__construct($a_id=0, $a_call_by_reference=true)
Constructor @access public.
update()
update object data
Class ilObject Basic functions for all objects.
redirection script todo: (a better solution should control the processing via a xml file)