ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
24include_once './Services/Component/classes/class.ilPlugin.php';
25include_once './Services/AuthShibboleth/interfaces/interface.ilShibbolethRoleAssignmentPlugin.php';
26require_once('./Services/AuthShibboleth/interfaces/interface.ilShibbolethAuthenticationPluginInt.php');
27
38
42 protected $active_plugins = array();
43
44
50 public final function getComponentType() {
51 return IL_COMP_SERVICE;
52 }
53
54
60 public final function getComponentName() {
61 return 'AuthShibboleth';
62 }
63
64
70 public final function getSlot() {
71 return 'ShibbolethAuthenticationHook';
72 }
73
74
80 public final function getSlotId() {
81 return 'shibhk';
82 }
83
84
88 protected final function slotInit() {
89 }
90
91
99 protected function checkValue($a_user_data, $a_keyword, $a_value) {
100 if (! $a_user_data[$a_keyword]) {
101 return false;
102 }
103 if (is_array($a_user_data[$a_keyword])) {
104 foreach ($a_user_data[$a_keyword] as $values) {
105 if (strcasecmp(trim($values), $a_value) == 0) {
106 return true;
107 }
108 }
109
110 return false;
111 }
112 if (strcasecmp(trim($a_user_data[$a_keyword]), trim($a_value)) == 0) {
113 return true;
114 }
115
116 return false;
117 }
118
119
125 public function beforeLogin(ilObjUser $user) {
126 return $user;
127 }
128
129
135 public function afterLogin(ilObjUser $user) {
136 return $user;
137 }
138
139
145 public function beforeCreateUser(ilObjUser $user) {
146 return $user;
147 }
148
149
155 public function afterCreateUser(ilObjUser $user) {
156 return $user;
157 }
158
159
165 public function beforeLogout(ilObjUser $user) {
166 return $user;
167 }
168
169
175 public function afterLogout(ilObjUser $user) {
176 return $user;
177 }
178
179
185 public function beforeUpdateUser(ilObjUser $user) {
186 return $user;
187 }
188
189
195 public function afterUpdateUser(ilObjUser $user) {
196 return $user;
197 }
198}
199
200?>
const IL_COMP_SERVICE