PHP Class Gollem_Auth, horde

Copyright 2004-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Michael Slusarz ([email protected])
Author: Jan Schneider ([email protected])
Datei anzeigen Open project: horde/horde Class Usage Examples

Public Methods

Method Description
authenticate ( array $credentials = [] ) : mixed Authenticate to the backend.
canAutoLogin ( string $key = null ) : array Can we log in without a login screen for the requested backend key?
changeBackend ( string $key ) Change the currently active backend.
getAutologinID ( string $backend ) : string Get the authentication ID to use for autologins based on the value of the 'hordeauth' parameter.
getBackend ( string $backend = null ) : mixed Loads the Gollem backend configuration from backends.php.
getPreferredBackend ( ) : string Get the current preferred backend key.
transparent ( Horde_Auth_Application $auth_ob ) : mixed Perform transparent authentication.

Protected Methods

Method Description
_getBackends ( ) : array Return stored backend list.
_setBackends ( array $backends ) Store backend list.

Method Details

_getBackends() protected static method

Return stored backend list.
protected static _getBackends ( ) : array
return array Backend configuration list.

_setBackends() protected static method

Store backend list.
protected static _setBackends ( array $backends )
$backends array Backend configuration list.

authenticate() public static method

Authenticate to the backend.
public static authenticate ( array $credentials = [] ) : mixed
$credentials array An array of login credentials. If empty, attempts to login to the cached session.
'password' - (string) The user password.
'backend' - (string) The backend key to use (from backends.php).
'userId' - (string) The username.
return mixed If authentication was successful, and no session exists, an array of data to add to the session. Otherwise returns false.

canAutoLogin() public static method

Can we log in without a login screen for the requested backend key?
public static canAutoLogin ( string $key = null ) : array
$key string The backend to login to.
return array The credentials needed to login ('userId', 'password', 'backend') or false if autologin not available.

changeBackend() public static method

Change the currently active backend.
public static changeBackend ( string $key )
$key string The ID of the backend to set as active.

getAutologinID() public static method

Get the authentication ID to use for autologins based on the value of the 'hordeauth' parameter.
public static getAutologinID ( string $backend ) : string
$backend string The backend to login to.
return string The ID string to use for logins.

getBackend() public static method

Loads the Gollem backend configuration from backends.php.
public static getBackend ( string $backend = null ) : mixed
$backend string Returns this labeled entry only.
return mixed If $backend is set return this entry; else, return the entire backends array. Returns false on error.

getPreferredBackend() public static method

Get the current preferred backend key.
public static getPreferredBackend ( ) : string
return string The preferred backend key.

transparent() public static method

Perform transparent authentication.
public static transparent ( Horde_Auth_Application $auth_ob ) : mixed
$auth_ob Horde_Auth_Application The authentication object.
return mixed If authentication was successful, and no session exists, an array of data to add to the session. Otherwise returns false.