Class Horde_Auth_Ldap
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.
Copyright 1999-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you did
not receive this file, http://www.horde.org/licenses/lgpl21
-
Horde_Auth_Base
-
Horde_Auth_Ldap
Methods summary
public
|
#
__construct( array $params = array() )
Constructor.
Parameters
- $params
- Required parameters:
<pre><span class="php-quote">'basedn'</span> - (string) [REQUIRED] The base DN <span class="php-keyword1">for</span> the LDAP server.
<span class="php-quote">'filter'</span> - (string) The LDAP formatted search filter to search <span class="php-keyword1">for</span>
users. This setting overrides the <span class="php-quote">'objectclass'</span> parameter.
<span class="php-quote">'ldap'</span> - (Horde_Ldap) [REQUIRED] Horde LDAP object.
<span class="php-quote">'objectclass - (string|array): The objectclass filter used to search
for users. Either a single or an array of objectclasses.
'</span>uid<span class="php-quote">' - (string) [REQUIRED] The username search key.</span></pre>
Throws
Overrides
|
public
|
#
addUser( string $userId, array $credentials )
Add a set of authentication credentials.
Add a set of authentication credentials.
Parameters
- $userId
- The userId to add.
- $credentials
- The credentials to be set.
Throws
Overrides
|
public
|
#
removeUser( string $userId, string $dn = null )
Remove a set of authentication credentials.
Remove a set of authentication credentials.
Parameters
- $userId
- The userId to add.
- $dn
- TODO
Throws
Overrides
|
public
|
#
updateUser( string $oldID, string $newID, array $credentials, string $olddn = null, string $newdn = null )
Update a set of authentication credentials.
Update a set of authentication credentials.
Parameters
- $oldID
- The old userId.
- $newID
- The new userId.
- $credentials
- The new credentials.
- $olddn
- The old user DN.
- $newdn
- The new user DN.
Throws
Overrides
|
public
string
|
#
resetPassword( string $userId )
Reset a user's password. Used for example when the user does not
remember the existing password.
Reset a user's password. Used for example when the user does not
remember the existing password.
Parameters
- $userId
- The user id for which to reset the password.
Returns
string The new password on success.
Throws
Overrides
|
public
array
|
#
listUsers( mixed $sort = false )
List Users
Returns
array List of Users
Throws
Overrides
|
public
boolean
|
#
exists( string $userId )
Checks if $userId exists in the LDAP backend system.
Checks if $userId exists in the LDAP backend system.
Parameters
- $userId
- User ID for which to check
Returns
boolean Whether or not $userId already exists.
Author
Marco Ferrante, University of Genova (I)
Overrides
|
Methods inherited from Horde_Auth_Base
authenticate(),
getCredential(),
getError(),
getParam(),
hasCapability(),
isLocked(),
lockUser(),
setCredential(),
setError(),
transparent(),
unlockUser(),
validateAuth()
|