Source for file oauth2.php
Documentation is available at oauth2.php
* @package Joomla.Platform
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE
* Google OAuth authentication class
* @package Joomla.Platform
* @var JOAuth2Client OAuth client for the Google authentication object.
* @param JRegistry $options JGoogleAuth options object.
* @param JOAuth2Client $client OAuth client for Google authentication.
public function __construct(JRegistry $options =
null, JOAuth2Client $client =
null)
* Method to authenticate to Google
* @return boolean True on success.
* Verify if the client has been authenticated
* @return boolean Is authenticated
* Method to retrieve data from Google
* @param string $url The URL for the request.
* @param mixed $data The data to include in the request.
* @param array $headers The headers to send with the request.
* @param string $method The type of http request to send.
* @return mixed Data from Google.
public function query($url, $data =
null, $headers =
null, $method =
'get')
return $this->client->query($url, $data, $headers, $method);
* Method to fill in Google-specific OAuth settings
* @return JOAuth2Client Google-configured Oauth2 client.
$this->client->setOption('authurl', 'https://accounts.google.com/o/oauth2/auth');
$this->client->setOption('tokenurl', 'https://accounts.google.com/o/oauth2/token');
$params['access_type'] =
'offline';
if ($params['access_type'] ==
'offline' &&
$this->client->getOption('userefresh') ===
null)
$params['approval_prompt'] =
'auto';
Documentation generated on Tue, 19 Nov 2013 15:09:42 +0100 by phpDocumentor 1.4.3