Gollem_Auth
in package
The Gollem_Auth class provides authentication for Gollem.
Copyright 2004-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Tags
Table of Contents
- authenticate() : mixed
- Authenticate to the backend.
- canAutoLogin() : array<string|int, mixed>
- Can we log in without a login screen for the requested backend key?
- changeBackend() : mixed
- Change the currently active backend.
- getAutologinID() : string
- Get the authentication ID to use for autologins based on the value of the 'hordeauth' parameter.
- getBackend() : mixed
- Loads the Gollem backend configuration from backends.php.
- getPreferredBackend() : string
- Get the current preferred backend key.
- transparent() : mixed
- Perform transparent authentication.
- _getBackends() : array<string|int, mixed>
- Return stored backend list.
- _setBackends() : mixed
- Store backend list.
Methods
authenticate()
Authenticate to the backend.
public
static authenticate([array<string|int, mixed> $credentials = array() ]) : mixed
Parameters
- $credentials : array<string|int, mixed> = 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.
Tags
Return values
mixed —If authentication was successful, and no session exists, an array of data to add to the session. Otherwise returns false.
canAutoLogin()
Can we log in without a login screen for the requested backend key?
public
static canAutoLogin([string $key = null ]) : array<string|int, mixed>
Parameters
- $key : string = null
-
The backend to login to.
Return values
array<string|int, mixed> —The credentials needed to login ('userId', 'password', 'backend') or false if autologin not available.
changeBackend()
Change the currently active backend.
public
static changeBackend(string $key) : mixed
Parameters
- $key : string
-
The ID of the backend to set as active.
Return values
mixed —getAutologinID()
Get the authentication ID to use for autologins based on the value of the 'hordeauth' parameter.
public
static getAutologinID(string $backend) : string
Parameters
- $backend : string
-
The backend to login to.
Return values
string —The ID string to use for logins.
getBackend()
Loads the Gollem backend configuration from backends.php.
public
static getBackend([string $backend = null ]) : mixed
Parameters
- $backend : string = null
-
Returns this labeled entry only.
Return values
mixed —If $backend is set return this entry; else, return the entire backends array. Returns false on error.
getPreferredBackend()
Get the current preferred backend key.
public
static getPreferredBackend() : string
Return values
string —The preferred backend key.
transparent()
Perform transparent authentication.
public
static transparent(Horde_Auth_Application $auth_ob) : mixed
Parameters
- $auth_ob : Horde_Auth_Application
-
The authentication object.
Return values
mixed —If authentication was successful, and no session exists, an array of data to add to the session. Otherwise returns false.
_getBackends()
Return stored backend list.
protected
static _getBackends() : array<string|int, mixed>
Return values
array<string|int, mixed> —Backend configuration list.
_setBackends()
Store backend list.
protected
static _setBackends(array<string|int, mixed> $backends) : mixed
Parameters
- $backends : array<string|int, mixed>
-
Backend configuration list.