Property | Type | Description | |
---|---|---|---|
$_app | string | Application for authentication. | |
$_appCapabilities | array | The list of application capabilities. | |
$_base | Horde_Auth_Base | The base auth driver, used for Horde authentication. | |
$_capabilities | array | Available capabilities. | |
$_view | string | The view mode. |
Method | Description | |
---|---|---|
__construct ( array $params = [] ) | Constructor. | |
addUser ( string $userId, array $credentials ) | Add 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 a user ID exists in the system. | |
getCredential ( mixed $name = null ) : mixed | Retrieve internal credential value(s). | |
getError ( boolean $msg = false ) : mixed | Returns the error type or message for an invalid authentication. | |
getLoginParams ( ) : array | Returns information on what login parameters to display on the login screen. | |
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 ) | Checks if $userId is currently locked. | |
listNames ( ) : array | List all users in the system with their real names. | |
listUsers ( $sort = false ) : array | List all users in the system. | |
lockUser ( string $userId, integer $time ) | Locks a user indefinitely or for a specified time | |
removeUser ( string $userId ) | Delete a set of authentication credentials. | |
requireAuth ( ) : boolean | Indicate whether the application requires authentication. | |
resetPassword ( string $userId ) : string | Reset a user's password. Used for example when the user does not remember the existing password. | |
runHook ( string $userId, array $credentials, string $type, string $method = null ) : array | Runs the pre/post-authenticate hook and parses the result. | |
setCredential ( string $name, mixed $value ) | Set 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 bad login count | |
updateUser ( string $oldID, string $newID, array $credentials ) | Update a set of authentication credentials. | |
validateAuth ( ) : boolean | Checks for triggers that may invalidate the current auth. |
Method | Description | |
---|---|---|
_authenticate ( string $userId, array $credentials ) | Find out if a set of login credentials are valid. | |
_setAuth ( ) : boolean | Set authentication credentials in the Horde session. | |
_setView ( ) | Sets the default global view mode in the horde session. This can be checked by applications, and overridden if desired. Also sets a cookie to remember the last view selection if applicable. |
public __construct ( array $params = [] ) | ||
$params | array | Required parameters: - app: (string) The application which is providing authentication. - base: (Horde_Auth_Base) The base Horde_Auth driver. Only needed if 'app' is 'horde'. |
protected _authenticate ( string $userId, array $credentials ) | ||
$userId | string | The user ID to check. |
$credentials | array | The credentials to use. This object will always be available in the 'auth_ob' key. |
protected _setView ( ) |
public authenticate ( string $userId, array $credentials, boolean $login = true ) : boolean | ||
$userId | string | The user ID 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 | Return the credential information, or null if the credential doesn't exist. |
public getLoginParams ( ) : array | ||
return | array | An array with the following keys:
'js_code' - (array) A list of javascript statements to be included. 'js_files' - (array) A list of javascript files to be included. 'params' - (array) A list of parameters to display on the login screen. Each entry is an array with the following entries: 'label' - (string) The label of the entry. 'type' - (string) 'select', 'text', or 'password'. 'value' - (mixed) If type is 'text' or 'password', the text to insert into the field by default. If type is 'select', an array with they keys as the option values and an array with the following keys: 'hidden' - (boolean) If true, the option will be hidden. 'name' - (string) The option label. 'selected' - (boolean) If true, will be selected by default. |
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 user ID to delete. |
public requireAuth ( ) : boolean | ||
return | boolean | True if application requires authentication. |
public resetPassword ( string $userId ) : string | ||
$userId | string | The user ID for which to reset the password. |
return | string | The new password on success. |
public runHook ( string $userId, array $credentials, string $type, string $method = null ) : array | ||
$userId | string | The userId who has been authorized. |
$credentials | array | The credentials of the user. |
$type | string | Either 'preauthenticate' or 'postauthenticate'. |
$method | string | The triggering method (preauthenticate only). Either 'authenticate' or 'transparent'. |
return | array | Two element array, $userId and $credentials. |
public setCredential ( string $name, mixed $value ) | ||
$name | string | The credential name to set. |
$value | mixed | The credential value to set. See getCredential() for the list of valid credentials/types. |
public transparent ( ) : boolean | ||
return | boolean | Whether or not the client is allowed. |
public unlockUser ( string $userId, boolean $resetBadLogins = false ) | ||
$userId | string | The userId to unlock. |
$resetBadLogins | boolean | Reset bad login counter, default no. |
public validateAuth ( ) : boolean | ||
return | boolean | True if the results of authenticate() are still valid. |
protected array $_appCapabilities | ||
return | array |
protected Horde_Auth_Base $_base | ||
return | Horde_Auth_Base |
protected array $_capabilities | ||
return | array |