IMP_Auth
in package
This class provides authentication for IMP.
Tags
Table of Contents
Methods
- authenticate() : mixed
- Authenticate to the mail server.
- authenticateCallback() : mixed
- Perform post-login tasks. Session creation requires the full IMP environment, which is not available until this callback.
- getAutoLoginServer() : string
- Returns the autologin server key.
- transparent() : bool
- Perform transparent authentication.
- _canAutoLogin() : array<string|int, mixed>
- Returns whether we can log in without a login screen for $server_key.
- _log() : mixed
- Log login related message.
Methods
authenticate()
Authenticate to the mail server.
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.
- server: (string) The server key to use (from backends.php).
- userId: (string) The username.
Tags
authenticateCallback()
Perform post-login tasks. Session creation requires the full IMP environment, which is not available until this callback.
public
static authenticateCallback() : mixed
Tags
getAutoLoginServer()
Returns the autologin server key.
public
static getAutoLoginServer() : string
Return values
string —The server key, or null if none available.
transparent()
Perform transparent authentication.
public
static transparent(Horde_Auth_Application $auth_ob) : bool
Parameters
- $auth_ob : Horde_Auth_Application
-
The authentication object.
Return values
bool —True on successful transparent authentication.
_canAutoLogin()
Returns whether we can log in without a login screen for $server_key.
protected
static _canAutoLogin([string $server_key = null ][, bool $force = false ]) : array<string|int, mixed>
Parameters
- $server_key : string = null
-
The server to check. Defaults to the autologin server.
- $force : bool = false
-
If true, check $server_key even if there is more than one server available.
Return values
array<string|int, mixed> —The credentials needed to login ('userId', 'password', 'server') or false if autologin not available.
_log()
Log login related message.
protected
static _log(bool $status, IMP_Imap $imap_ob) : mixed
Parameters
- $status : bool
-
True on success, false on failure.
- $imap_ob : IMP_Imap
-
The IMP_Imap object to use.