00001 <?php
00002
00020 define('AUTH_PLUGIN_CATEGORY', 'auth');
00021 import('classes.plugins.Plugin');
00022
00023 class AuthPlugin extends Plugin {
00024
00026 var $settings;
00027
00029 var $authId;
00030
00035 function AuthPlugin($settings = array(), $authId = null) {
00036 parent::Plugin();
00037 $this->settings = $settings;
00038 $this->authId = $authId;
00039 }
00040
00041
00042
00043
00044
00045
00051 function getName() {
00052 assert(false);
00053 }
00054
00060 function getDisplayName() {
00061 assert(false);
00062 }
00063
00069 function getDescription() {
00070 assert(false);
00071 }
00072
00078 function getSettingsTemplate() {
00079 return $this->getTemplatePath() . 'settings.tpl';
00080 }
00081
00082
00083
00084
00085
00086
00092 function doGetUserInfo(&$user) {
00093 if (isset($this->settings['syncProfiles'])) {
00094 return $this->getUserInfo($user);
00095 }
00096 return false;
00097 }
00098
00104 function doSetUserInfo(&$user) {
00105 if (isset($this->settings['syncProfiles'])) {
00106 return $this->setUserInfo($user);
00107 }
00108 return false;
00109 }
00110
00117 function doSetUserPassword($username, $password) {
00118 if (isset($this->settings['syncPasswords'])) {
00119 return $this->setUserPassword($username, $password);
00120 }
00121 return false;
00122 }
00123
00129 function doCreateUser(&$user) {
00130 if (isset($this->settings['createUsers'])) {
00131 return $this->createUser($user);
00132 }
00133 return false;
00134 }
00135
00136
00137
00138
00139
00140
00141
00148 function &getInstance($settings, $authId) {
00149 $returner = null;
00150 return $returner;
00151 }
00152
00159 function authenticate($username, $password) {
00160 return false;
00161 }
00162
00163
00164
00165
00166
00167
00168
00174 function userExists($username) {
00175 return false;
00176 }
00177
00184 function getUserInfo(&$user) {
00185 return false;
00186 }
00187
00193 function setUserInfo(&$user) {
00194 return false;
00195 }
00196
00203 function setUserPassword($username, $password) {
00204 return false;
00205 }
00206
00212 function createUser(&$user) {
00213 return false;
00214 }
00215
00223 function deleteUser($username) {
00224 return false;
00225 }
00226
00230 function isSitePlugin() {
00231 return true;
00232 }
00233
00237 function getManagementVerbs() {
00238 return array(
00239 array(
00240 'authSources',
00241 __('admin.authSources')
00242 )
00243 );
00244 }
00245
00246 function manage($verb, $args) {
00247 if ($verb === 'authSources') {
00248 Request::redirect('index', 'admin', 'auth');
00249 }
00250 return false;
00251 }
00252 }
00253
00254 ?>