Class Horde_Auth_Passwd
The Horde_Auth_Passwd:: class provides a passwd-file implementation of
the Horde authentication system.
Copyright 1997-2007 Rasmus Lerdorf rasmus@php.net
Copyright 2002-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_Passwd
Methods summary
public
|
#
__construct( array $params = array() )
Constructor.
Parameters
- $params
- Connection parameters:
<pre><span class="php-quote">'encryption'</span> - (string) The encryption to <span class="php-keyword1">use</span> to store the password in
the table (e.g. plain, <span class="php-keyword2">crypt</span>, <span class="php-keyword2">md5</span>-hex, <span class="php-keyword2">md5</span>-base64, smd5,
sha, ssha, aprmd5).
<span class="php-keyword1">DEFAULT</span>: <span class="php-quote">'crypt-des'</span>
<span class="php-quote">'filename'</span> - (string) [REQUIRED] The passwd <span class="php-keyword2">file</span> to <span class="php-keyword1">use</span>.
<span class="php-quote">'lock'</span> - (boolean) Should we lock the passwd <span class="php-keyword2">file</span>? The password <span class="php-keyword2">file</span>
cannot be changed (add, edit, <span class="php-keyword1">or</span> <span class="php-keyword2">delete</span> users) unless this is
<span class="php-keyword1">true</span>.
<span class="php-keyword1">DEFAULT</span>: <span class="php-keyword1">false</span>
<span class="php-quote">'show_encryption'</span> - (boolean) Whether <span class="php-keyword1">or</span> not to prepend the encryption
in the password field.
<span class="php-keyword1">DEFAULT</span>: <span class="php-keyword1">false</span></pre>
Throws
InvalidArgumentException
Overrides
|
public
|
#
__destruct( )
Writes changes to passwd file and unlocks it. Takes no arguments and
has no return value. Called on script shutdown.
Writes changes to passwd file and unlocks it. Takes no arguments and
has no return value. Called on script shutdown.
|
public
boolean
|
#
hasCapability( string $capability )
Queries the current Auth object to find out if it supports the given
capability.
Queries the current Auth object to find out if it supports the given
capability.
Parameters
- $capability
- The capability to test for.
Returns
boolean Whether or not the capability is supported.
Overrides
|
public
array
|
#
listUsers( mixed $sort = false )
List all users in the system.
List all users in the system.
Returns
array The array of userIds.
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 add.
Throws
Overrides
|
public
|
#
updateUser( string $oldID, string $newID, array $credentials )
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
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.
Throws
Overrides
|
public
|
#
removeUser( string $userId )
Delete a set of authentication credentials.
Delete a set of authentication credentials.
Parameters
- $userId
- The userId to delete.
Throws
Overrides
|
Methods inherited from Horde_Auth_Base
authenticate(),
exists(),
getCredential(),
getError(),
getParam(),
isLocked(),
lockUser(),
setCredential(),
setError(),
transparent(),
unlockUser(),
validateAuth()
|