00001 <?php
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00034
00035 class FF_AuthSource {
00036
00037
00042 var $name;
00043
00048 var $serverName;
00049
00054 var $capabilities = array(
00055 'resetpassword' => false,
00056 'updateusername' => false,
00057 'transparent' => false);
00058
00063 var $o_result;
00064
00065
00066
00067
00077 function FF_AuthSource($in_name, $in_params)
00078 {
00079 $this->name = $in_name;
00080 $this->o_result = new FF_Result();
00081 $this->o_result->setSuccess(false);
00082 }
00083
00084
00085
00086
00102 function &factory($in_type, $in_name, $in_params)
00103 {
00104 $pth_authFile = dirname(__FILE__) . '/' . $in_type . '.php';
00105 if (!file_exists($pth_authFile)) {
00106 $o_auth =& new FF_AuthSource($in_name, $in_params);
00107 return $o_auth;
00108 }
00109
00110 require_once $pth_authFile;
00111 $s_authClass = 'FF_AuthSource_' . $in_type;
00112 $o_auth =& new $s_authClass($in_name, $in_params);
00113 return $o_auth;
00114 }
00115
00116
00117
00118
00125 function authenticate($username, $password)
00126 {
00127 return $this->o_result;
00128 }
00129
00130
00131
00132
00139 function transparent()
00140 {
00141 return false;
00142 }
00143
00144
00145
00146
00153 function getName()
00154 {
00155 return $this->name;
00156 }
00157
00158
00159
00160
00167 function getServerName()
00168 {
00169 return $this->serverName;
00170 }
00171
00172
00173
00174
00183 function hasCapability($in_name)
00184 {
00185 return $this->capabilities[$in_name];
00186 }
00187
00188
00189
00190
00200 function updatePassword($in_userId, $in_newPassword)
00201 {
00202
00203 }
00204
00205
00206
00207
00217 function updateUserName($in_userId, $in_newUserName)
00218 {
00219
00220 }
00221
00222
00223 }
00224 ?>