## API Documentation

# Gdata/ClientLogin.php

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

category
  Zend
copyright
  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
license
  New BSD License
package
  Zend_Gdata
subpackage
  Gdata
version
  $Id: ClientLogin.php 23775 2011-03-01 17:25:24Z ralph $

## \Zend_Gdata_ClientLogin
jump to top

Class to facilitate Google's "Account Authentication for Installed Applications" also known as "ClientLogin".

see
  \http://code.google.com/apis/accounts/AuthForInstalledApps.html
category
  Zend
copyright
  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
license
  New BSD License
package
  Zend_Gdata
subpackage
  Gdata

### Constants

`CLIENTLOGIN_URI = 'https://www.google.com/accounts/ClientLogin'`

The Google client login URI

`DEFAULT_SOURCE = 'Zend-ZendFramework'`

The default 'source' parameter to send to Google

### Methods

`getHttpClient( string $email, string $password, string $service = xapi, \Zend_Gdata_HttpClient $client = null, string $source = self, string $loginToken = null, string $loginCaptcha = null, $loginUri = self, string $accountType = HOSTED_OR_GOOGLE ) : \Zend_Gdata_HttpClient`
static

Set Google authentication credentials.

Must be done before trying to do any Google Data operations that require authentication. For example, viewing private data, or posting or deleting entries.

Parameters

Name | Type | Description
--- | --- | ---
$email | string |
$password | string |
$service | string |
$client | \Zend_Gdata_HttpClient |
$source | string |
$loginToken | string | The token identifier as provided by the server.
$loginCaptcha | string | The user's response to the CAPTCHA challenge.
$loginUri |  |
$accountType | string | An optional string to identify whether the account to be authenticated is a google or a hosted account. Defaults to 'HOSTED_OR_GOOGLE'. See: http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html#Request

Returns

Type | Description
--- | ---
\Zend_Gdata_HttpClient |

Throws

Exception | Description
--- | ---
\Zend_Gdata_App_AuthException |
\Zend_Gdata_App_HttpException |
\Zend_Gdata_App_CaptchaRequiredException |

Documentation was generated by DocBlox 0.13.3.