ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilShibbolethAuthenticationPlugin.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 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 
24 include_once './Services/Component/classes/class.ilPlugin.php';
25 include_once './Services/AuthShibboleth/interfaces/interface.ilShibbolethRoleAssignmentPlugin.php';
26 require_once('./Services/AuthShibboleth/interfaces/interface.ilShibbolethAuthenticationPluginInt.php');
27 
38 {
39 
43  protected $active_plugins = array();
44 
45 
51  final public function getComponentType()
52  {
53  return IL_COMP_SERVICE;
54  }
55 
56 
62  final public function getComponentName()
63  {
64  return 'AuthShibboleth';
65  }
66 
67 
73  final public function getSlot()
74  {
75  return 'ShibbolethAuthenticationHook';
76  }
77 
78 
84  final public function getSlotId()
85  {
86  return 'shibhk';
87  }
88 
89 
93  final protected function slotInit()
94  {
95  }
96 
97 
105  protected function checkValue($a_user_data, $a_keyword, $a_value)
106  {
107  if (!$a_user_data[$a_keyword]) {
108  return false;
109  }
110  if (is_array($a_user_data[$a_keyword])) {
111  foreach ($a_user_data[$a_keyword] as $values) {
112  if (strcasecmp(trim($values), $a_value) == 0) {
113  return true;
114  }
115  }
116 
117  return false;
118  }
119  if (strcasecmp(trim($a_user_data[$a_keyword]), trim($a_value)) == 0) {
120  return true;
121  }
122 
123  return false;
124  }
125 
126 
132  public function beforeLogin(ilObjUser $user)
133  {
134  return $user;
135  }
136 
137 
143  public function afterLogin(ilObjUser $user)
144  {
145  return $user;
146  }
147 
148 
155  {
156  return $user;
157  }
158 
159 
165  public function afterCreateUser(ilObjUser $user)
166  {
167  return $user;
168  }
169 
170 
176  public function beforeLogout(ilObjUser $user)
177  {
178  return $user;
179  }
180 
181 
187  public function afterLogout(ilObjUser $user)
188  {
189  return $user;
190  }
191 
192 
199  {
200  return $user;
201  }
202 
203 
209  public function afterUpdateUser(ilObjUser $user)
210  {
211  return $user;
212  }
213 }
$values
$user
Definition: migrateto20.php:57
slotInit()
Object initialization done by slot.
const IL_COMP_SERVICE