PHP 클래스 Horde_Auth_Ldap, horde

'preauthenticate' hook should return LDAP connection information in the 'ldap' credentials key.
저자: Jon Parise ([email protected])
상속: extends Horde_Auth_Base
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_capabilities array An array of capabilities, so that the driver can report which operations it supports and which it doesn't.
$_ldap Horde_Ldap LDAP object

공개 메소드들

메소드 설명
__construct ( array $params = [] ) Constructor.
addUser ( string $userId, array $credentials ) Add a set of authentication credentials.
exists ( string $userId ) : boolean Checks if $userId exists in the LDAP backend system.
listUsers ( boolean $sort = false ) : array Lists all users in the system.
removeUser ( string $userId, string $dn = null ) Remove 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, string $olddn = null, string $newdn = null ) Update a set of authentication credentials.

보호된 메소드들

메소드 설명
_authenticate ( string $userId, array $credentials ) Find out if the given set of login credentials are valid.
_lookupShadow ( string $dn ) : array Checks for shadowLastChange and shadowMin/Max support and returns their values. We will also check for pwdLastSet if Active Directory is support is requested. For this check to succeed we need to be bound to the directory.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $params = [] )
$params array Required parameters:
'basedn' - (string) [REQUIRED] The base DN for the LDAP server.
'filter' - (string) The LDAP formatted search filter to search for
           users. This setting overrides the 'objectclass' parameter.
'ldap' - (Horde_Ldap) [REQUIRED] Horde LDAP object.
'objectclass - (string|array): The objectclass filter used to search
               for users. Either a single or an array of objectclasses.
'uid' - (string) [REQUIRED] The username search key.

_authenticate() 보호된 메소드

Find out if the given 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.

_lookupShadow() 보호된 메소드

Checks for shadowLastChange and shadowMin/Max support and returns their values. We will also check for pwdLastSet if Active Directory is support is requested. For this check to succeed we need to be bound to the directory.
protected _lookupShadow ( string $dn ) : array
$dn string The dn of the user.
리턴 array Array with keys being "shadowlastchange", "shadowmin" "shadowmax", "shadowwarning" and containing their respective values or false for no support.

addUser() 공개 메소드

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

exists() 공개 메소드

Checks if $userId exists in the LDAP backend system.
저자: Marco Ferrante, University of Genova (I)
public exists ( string $userId ) : boolean
$userId string User ID for which to check
리턴 boolean Whether or not $userId already exists.

listUsers() 공개 메소드

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

removeUser() 공개 메소드

Remove a set of authentication credentials.
public removeUser ( string $userId, string $dn = null )
$userId string The userId to add.
$dn string TODO

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 on success.

updateUser() 공개 메소드

Update a set of authentication credentials.
public updateUser ( string $oldID, string $newID, array $credentials, string $olddn = null, string $newdn = null )
$oldID string The old userId.
$newID string The new userId.
$credentials array The new credentials.
$olddn string The old user DN.
$newdn string The new user DN.

프로퍼티 상세

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

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

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

LDAP object
protected Horde_Ldap $_ldap
리턴 Horde_Ldap