Property | Type | Description | |
---|---|---|---|
$_capabilities | array | An array of capabilities, so that the driver can report which operations it supports and which it doesn't. | |
$_credentials | array | The credentials currently being authenticated. | |
$_error | array | Authentication error information. | |
$_history_api | Horde_History | History object. | |
$_lock_api | Horde_Lock | Lock object. | |
$_logger | Horde_Log_Logger | Logger object. | |
$_params | array | Hash containing parameters needed for the drivers. |
Method | Description | |
---|---|---|
__construct ( array $params = [] ) | Constructor. | |
addUser ( string $userId, array $credentials ) | Adds a set of authentication credentials. | |
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. | |
exists ( string $userId ) : boolean | Checks if $userId exists in the system. | |
getCredential ( mixed $name = null ) : mixed | Returns internal credential value(s). | |
getError ( boolean $msg = false ) : mixed | Returns the error type or message for an invalid authentication. | |
getParam ( string $param ) : string | Returns the named parameter for the current auth driver. | |
hasCapability ( string $capability ) : boolean | Queries the current driver to find out if it supports the given capability. | |
isLocked ( string $userId, boolean $show_details = false ) : boolean | array | Returns whether a user is currently locked. | |
listUsers ( boolean $sort = false ) : mixed | Lists all users in the system. | |
lockUser ( string $userId, integer $time ) | Locks a user indefinitely or for a specified time. | |
removeUser ( string $userId ) | Deletes 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. | |
searchUsers ( string $search ) : array | Searches the users for a substring. | |
setCredential ( string $type, mixed $value ) | Sets an internal credential value. | |
setError ( string $type, string $msg = null ) | Sets the error message for an invalid authentication. | |
transparent ( ) : boolean | Automatic authentication. | |
unlockUser ( string $userId, boolean $resetBadLogins = false ) | Unlocks a user and optionally resets the bad login count. | |
updateUser ( string $oldID, string $newID, array $credentials ) | Updates a set of authentication credentials. | |
validateAuth ( ) : boolean | Checks for triggers that may invalidate the current auth. |
Method | Description | |
---|---|---|
_authenticate ( string $userId, array $credentials ) | Authentication stub. | |
_badLogin ( string $userId ) | Handles a bad login. | |
_resetBadLogins ( string $userId ) | Resets the bad login counter. | |
_sort ( array $users, boolean $sort ) : array | Basic sort implementation. |
public __construct ( array $params = [] ) | ||
$params | array | Optional parameters: - default_user: (string) The default user. - logger: (Horde_Log_Logger, optional) A logger object. - lock_api: (Horde_Lock, optional) A locking object. - history_api: (Horde_History, optional) A history object. - login_block_count: (integer, optional) How many failed logins trigger autoblocking? 0 disables the feature. - login_block_time: (integer, options) How many minutes should autoblocking last? 0 means no expiration. |
abstract protected _authenticate ( string $userId, array $credentials ) | ||
$userId | string | The userID to check. |
$credentials | array | An array of login credentials. |
protected _resetBadLogins ( string $userId ) | ||
$userId | string | The user to reset. |
public authenticate ( string $userId, array $credentials, boolean $login = true ) : boolean | ||
$userId | string | The userId to check. |
$credentials | array | The credentials to check. |
$login | boolean | Whether to log the user in. If false, we'll only test the credentials and won't modify the current session. Defaults to true. |
return | boolean | Whether or not the credentials are valid. |
public getCredential ( mixed $name = null ) : mixed | ||
$name | mixed | The credential value to get. If null, will return the entire credential list. Valid names: - 'change': (boolean) Do credentials need to be changed? - 'credentials': (array) The credentials needed to authenticate. - 'expire': (integer) UNIX timestamp of the credential expiration date. - 'userId': (string) The user ID. |
return | mixed | The credential information, or null if the credential doesn't exist. |
public hasCapability ( string $capability ) : boolean | ||
$capability | string | The capability to test for. |
return | boolean | Whether or not the capability is supported. |
public removeUser ( string $userId ) | ||
$userId | string | The userId to delete. |
public resetPassword ( string $userId ) : string | ||
$userId | string | The user id for which to reset the password. |
return | string | The new password on success. |
public searchUsers ( string $search ) : array | ||
$search | string | The search term. |
return | array | A list of all matching users. |
public setCredential ( string $type, mixed $value ) | ||
$type | string | The credential name to set. See getCredential() for the list of valid credentials/types. |
$value | mixed | The credential value to set. |
public transparent ( ) : boolean | ||
return | boolean | Whether transparent login is supported. |
public unlockUser ( string $userId, boolean $resetBadLogins = false ) | ||
$userId | string | The user to unlock. |
$resetBadLogins | boolean | Reset bad login counter? |
public validateAuth ( ) : boolean | ||
return | boolean | True if the results of authenticate() are still valid. |
protected array $_capabilities | ||
return | array |
protected array $_credentials | ||
return | array |
protected array $_error | ||
return | array |
protected Horde_History $_history_api | ||
return | Horde_History |
protected Horde_Log_Logger $_logger | ||
return | Horde_Log_Logger |
protected array $_params | ||
return | array |