$_capabilities
$_capabilities : array
An array of capabilities, so that the driver can report which operations it supports and which it doesn't.
The Horde_Auth_Ldap class provides an LDAP implementation of the Horde authentication system.
'preauthenticate' hook should return LDAP connection information in the 'ldap' credentials key.
__construct(array $params = array())
Constructor.
array | $params | 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(string $userId, array $credentials, boolean $login = true) : boolean
Finds out if a set of login credentials are valid, and if requested, mark the user as logged in in the current session.
string | $userId | The userId to check. |
array | $credentials | The credentials to check. |
boolean | $login | Whether to log the user in. If false, we'll only test the credentials and won't modify the current session. Defaults to true. |
Whether or not the credentials are valid.
isLocked(string $userId, boolean $show_details = false) : boolean|array
Returns whether a user is currently locked.
string | $userId | The user to check. |
boolean | $show_details | Return timeout too? |
If $show_details is a true, an array with 'locked' and 'lock_timeout' values. Whether the user is locked, otherwise.
updateUser(string $oldID, string $newID, array $credentials, string $olddn = null, string $newdn = null)
Update a set of authentication credentials.
string | $oldID | The old userId. |
string | $newID | The new userId. |
array | $credentials | The new credentials. |
string | $olddn | The old user DN. |
string | $newdn | The new user DN. |
transparent() : boolean
Automatic authentication.
Transparent authentication should set 'userId', 'credentials', or 'params' in $this->_credentials as needed - these values will be used to set the credentials in the session.
Transparent authentication should normally never throw an error - false should be returned.
Whether transparent login is supported.
getCredential(mixed $name = null) : mixed
Returns internal credential value(s).
mixed | $name | The credential value to get. If null, will return the entire credential list. Valid names:
|
The credential information, or null if the credential doesn't exist.
_sort(array $users, boolean $sort) : array
Basic sort implementation.
If the backend has listUsers and doesn't have a native sorting option, fall back to this method.
array | $users | An array of usernames. |
boolean | $sort | Whether to sort or not. |
the users, sorted or not
_authenticate(string $userId, array $credentials)
Find out if the given set of login credentials are valid.
On failure, Horde_Auth_Exception should pass a message string (if any) in the message field, and the HordeAuth::REASON* constant in the code field (defaults to Horde_Auth::REASON_MESSAGE).
string | $userId | The userId to check. |
array | $credentials | An array of login credentials. |
_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.
string | $dn | The dn of the user. |
Array with keys being "shadowlastchange", "shadowmin" "shadowmax", "shadowwarning" and containing their respective values or false for no support.