PHP Class IMP_Auth, horde

Author: Chuck Hagenbuch ([email protected])
Author: Jon Parise ([email protected])
Author: Michael Slusarz ([email protected])
Show file Open project: horde/horde Class Usage Examples

Public Methods

Method Description
authenticate ( array $credentials = [] ) Authenticate to the mail server.
authenticateCallback ( ) 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 ( Horde_Auth_Application $auth_ob ) : boolean Perform transparent authentication.

Protected Methods

Method Description
_canAutoLogin ( string $server_key = null, boolean $force = false ) : array Returns whether we can log in without a login screen for $server_key.
_log ( boolean $status, IMP_Imap $imap_ob ) Log login related message.

Method Details

_canAutoLogin() protected static method

Returns whether we can log in without a login screen for $server_key.
protected static _canAutoLogin ( string $server_key = null, boolean $force = false ) : array
$server_key string The server to check. Defaults to the autologin server.
$force boolean If true, check $server_key even if there is more than one server available.
return array The credentials needed to login ('userId', 'password', 'server') or false if autologin not available.

_log() protected static method

Log login related message.
protected static _log ( boolean $status, IMP_Imap $imap_ob )
$status boolean True on success, false on failure.
$imap_ob IMP_Imap The IMP_Imap object to use.

authenticate() public static method

Authenticate to the mail server.
public static authenticate ( array $credentials = [] )
$credentials 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.

authenticateCallback() public static method

Perform post-login tasks. Session creation requires the full IMP environment, which is not available until this callback.
public static authenticateCallback ( )

getAutoLoginServer() public static method

Returns the autologin server key.
public static getAutoLoginServer ( ) : string
return string The server key, or null if none available.

transparent() public static method

Perform transparent authentication.
public static transparent ( Horde_Auth_Application $auth_ob ) : boolean
$auth_ob Horde_Auth_Application The authentication object.
return boolean True on successful transparent authentication.