PHP 클래스 Horde_Auth_Passwd, horde

저자: Rasmus Lerdorf ([email protected])
저자: Chuck Hagenbuch ([email protected])
상속: extends Horde_Auth_Base
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_capabilities array An array of capabilities, so that the driver can report which operations it supports and which it doesn't.
$_exclude array List of users that should be excluded from being listed/handled in any way by this driver.
$_fplock resource Filehandle for lockfile.
$_groups array Array of groups and members.
$_locked boolean Locking state.
$_users array Hash list of users.

공개 메소드들

메소드 설명
__construct ( array $params = [] ) Constructor.
__destruct ( ) Writes changes to passwd file and unlocks it. Takes no arguments and has no return value. Called on script shutdown.
addUser ( string $userId, array $credentials ) Add a set of authentication credentials.
hasCapability ( string $capability ) : boolean Queries the current Auth object to find out if it supports the given capability.
listUsers ( boolean $sort = false ) : array Lists all users in the system.
removeUser ( string $userId ) Delete a set of authentication credentials.
resetPassword ( string $userId ) : string Reset a user's password. Used for example when the user does not remember the existing password.
updateUser ( string $oldID, string $newID, array $credentials ) Update a set of authentication credentials.

보호된 메소드들

메소드 설명
_authenticate ( string $userId, array $credentials ) Find out if a set of login credentials are valid.
_comparePasswords ( string $encrypted, string $plaintext ) : boolean Compare an encrypted password to a plaintext string to see if they match.
_read ( ) Read and, if requested, lock the password file.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $params = [] )
$params array Connection parameters:
'encryption' - (string) The encryption to use to store the password in
               the table (e.g. plain, crypt, md5-hex, md5-base64, smd5,
               sha, ssha, aprmd5).
               DEFAULT: 'crypt-des'
'filename' - (string) [REQUIRED] The passwd file to use.
'lock' - (boolean) Should we lock the passwd file? The password file
         cannot be changed (add, edit, or delete users) unless this is
         true.
         DEFAULT: false
'show_encryption' - (boolean) Whether or not to prepend the encryption
                    in the password field.
                    DEFAULT: false

__destruct() 공개 메소드

Writes changes to passwd file and unlocks it. Takes no arguments and has no return value. Called on script shutdown.
public __destruct ( )

_authenticate() 보호된 메소드

Find out if a set of login credentials are valid.
protected _authenticate ( string $userId, array $credentials )
$userId string The userId to check.
$credentials array An array of login credentials.

_comparePasswords() 보호된 메소드

Compare an encrypted password to a plaintext string to see if they match.
protected _comparePasswords ( string $encrypted, string $plaintext ) : boolean
$encrypted string The crypted password to compare against.
$plaintext string The plaintext password to verify.
리턴 boolean True if matched, false otherwise.

_read() 보호된 메소드

Read and, if requested, lock the password file.
protected _read ( )

addUser() 공개 메소드

Add a set of authentication credentials.
public addUser ( string $userId, array $credentials )
$userId string The userId to add.
$credentials array The credentials to add.

hasCapability() 공개 메소드

Queries the current Auth object to find out if it supports the given capability.
public hasCapability ( string $capability ) : boolean
$capability string The capability to test for.
리턴 boolean Whether or not the capability is supported.

listUsers() 공개 메소드

Lists all users in the system.
public listUsers ( boolean $sort = false ) : array
$sort boolean Sort the users?
리턴 array The array of userIds.

removeUser() 공개 메소드

Delete a set of authentication credentials.
public removeUser ( string $userId )
$userId string The userId to delete.

resetPassword() 공개 메소드

Reset a user's password. Used for example when the user does not remember the existing password.
public resetPassword ( string $userId ) : string
$userId string The user id for which to reset the password.
리턴 string The new password.

updateUser() 공개 메소드

Update a set of authentication credentials.
public updateUser ( string $oldID, string $newID, array $credentials )
$oldID string The old userId.
$newID string The new userId.
$credentials array The new credentials

프로퍼티 상세

$_capabilities 보호되어 있는 프로퍼티

An array of capabilities, so that the driver can report which operations it supports and which it doesn't.
protected array $_capabilities
리턴 array

$_exclude 보호되어 있는 프로퍼티

List of users that should be excluded from being listed/handled in any way by this driver.
protected array $_exclude
리턴 array

$_fplock 보호되어 있는 프로퍼티

Filehandle for lockfile.
protected resource $_fplock
리턴 resource

$_groups 보호되어 있는 프로퍼티

Array of groups and members.
protected array $_groups
리턴 array

$_locked 보호되어 있는 프로퍼티

Locking state.
protected bool $_locked
리턴 boolean

$_users 보호되어 있는 프로퍼티

Hash list of users.
protected array $_users
리턴 array