ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
33 include_once "./Services/Object/classes/class.ilObject.php";
34 
36 {
43  public 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  public function checkAuthLDAP()
50  {
51  $settings = $this->ilias->getAllSettings();
52 
53  if (!$settings["ldap_server"] or !$settings["ldap_basedn"] or !$settings["ldap_port"]) {
54  return false;
55  }
56 
57  $this->ilias->setSetting('ldap_active', true);
58 
59  return true;
60  }
61 
62  public function checkAuthSHIB()
63  {
64  $settings = $this->ilias->getAllSettings();
65 
66  if (!$settings["hos_type"] or !$settings["shib_user_default_role"] or !$settings["shib_login"]
67  or !$settings["shib_firstname"] or !$settings["shib_lastname"]) {
68  return false;
69  }
70 
71  $this->ilias->setSetting('shibboleth_active', true);
72 
73  return true;
74  }
75 
76  public function checkAuthRADIUS()
77  {
78  $settings = $this->ilias->getAllSettings();
79 
80  if (!$settings["radius_server"] or !$settings["radius_shared_secret"] or !$settings["radius_port"]) {
81  return false;
82  }
83 
84  $this->ilias->setSetting('radius_active', true);
85 
86  return true;
87  }
88 
89  public function checkAuthScript()
90  {
91  $settings = $this->ilias->getAllSettings();
92 
93  if (!$settings["auth_script_name"]) {
94  return false;
95  }
96 
97  $this->ilias->setSetting('script_active', true);
98 
99  return true;
100  }
101 
108  public function update()
109  {
110  if (!parent::update()) {
111  return false;
112  }
113 
114  // put here object specific stuff
115 
116  return true;
117  }
118 
119 
126  public function delete()
127  {
128  // always call parent delete function first!!
129  if (!parent::delete()) {
130  return false;
131  }
132 
133  //put here your module specific stuff
134 
135  return true;
136  }
137 } // END class.ilObjAuthSettings
update()
update object data
Class ilObjAuthSettings.
__construct($a_id=0, $a_call_by_reference=true)
Constructor public.
redirection script todo: (a better solution should control the processing via a xml file) ...
update($pash, $contents, Config $config)