PHP Class Horde_Auth_Ldap, horde

'preauthenticate' hook should return LDAP connection information in the 'ldap' credentials key.
Author: Jon Parise ([email protected])
Inheritance: extends Horde_Auth_Base
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_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

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
_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.

Method Details

__construct() public méthode

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() protected méthode

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() protected méthode

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.
Résultat array Array with keys being "shadowlastchange", "shadowmin" "shadowmax", "shadowwarning" and containing their respective values or false for no support.

addUser() public méthode

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() public méthode

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

listUsers() public méthode

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

removeUser() public méthode

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

resetPassword() public méthode

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.
Résultat string The new password on success.

updateUser() public méthode

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.

Property Details

$_capabilities protected_oe property

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

$_ldap protected_oe property

LDAP object
protected Horde_Ldap $_ldap
Résultat Horde_Ldap