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. |
public static function transparent($auth_ob)
{
$credentials = $auth_ob->getCredential('credentials');
if (empty($credentials['transparent'])) {
/* Attempt hordeauth authentication. */
$credentials = self::canAutoLogin();
if ($credentials === false) {
return false;
}
} else {
/* It is possible that preauthenticate() set the credentials.
* If so, use that information instead of hordeauth. */
$credentials['userId'] = $auth_ob->getCredential('userId');
}
try {
return self::authenticate($credentials);
} catch (Horde_Auth_Exception $e) {
return false;
}
}
/** * Tries to transparently authenticate with the server and create a * session. * * @param Horde_Core_Auth_Application $auth_ob The authentication object. * * @return boolean Whether transparent login is supported. * @throws Horde_Auth_Exception */ public function authTransparent($auth_ob) { $this->init(); if ($result = Gollem_Auth::transparent($auth_ob)) { $this->_addSessVars($result); return true; } return false; }