File_Passwd::staticAuth() -- Fast authentication Описание
Static user autentication.
Though this approach should be reasonable fast, it is NOT
with APR compatible MD5 encryption used for htpasswd style
password files encrypted in MD5.
Generating one MD5 password takes about 0.25 seconds!
Depending on $type,
$opt should be:
Параметр
- string
$type
Unix, Cvs, Smb, Authbasic or Authdigest
- string
$file
path to passwd file
- string
$user
the user to authenticate
- string
$pass
the plaintext password
- mixed
$opt
Возвращаемое значение
Returns TRUE if authenticated, FALSE if not, or PEAR_Error on failure.
Таблица 26-1. Возможные значения PEAR_Error Error Code | Summary |
---|
FILE_PASSWD_E_NOT_EXISTS | passwd file doesn't exist | FILE_PASSWD_E_FILE_NOT_OPENED | passwd file couldn't be opened in read mode | FILE_PASSWD_E_FILE_NOT_LOCKED | passwd file couldn't be locked shared | FILE_PASSWD_E_FILE_NOT_UNLOCKED | passwd file couldn't be unlocked (only if auth fails) | FILE_PASSWD_E_FILE_NOT_CLOSED | passwd file couldn't be closed /only if auth fails) | FILE_PASSWD_E_UNDEFINED | if class/file couldn't be loaded | FILE_PASSWD_E_INVALID_ENC_MODE | supplied encryption mode is not supported | FILE_PASSWD_E_USER_NOT_IN_REALM | user doesn't exist in this realm (only File_Passwd_Authdigest) |
ЗаметкаЭта функция должна вызываться статически.
|