Class Zend_Gdata_HttpClient

Description

Gdata Http Client object.

Class to extend the generic Zend Http Client with the ability to perform secure AuthSub requests

  • copyright: Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Gdata/HttpClient.php (line 46)

Zend_Http_Client
   |
   --Zend_Gdata_HttpClient
Method Summary
 array filterHttpRequest (string $method, string $url, [array $headers = array()], [string $body = null], [string $contentType = null])
 string getAuthSubToken ()
 Zend_Gdata_HttpClient setAuthSubPrivateKey (string $key, [string $passphrase = null])
 void setAuthSubPrivateKeyFile (string $file, [string $passphrase = null], [bool $useIncludePath = false])
Variables
Methods
filterHttpRequest (line 200)

Filters the HTTP requests being sent to add the Authorization header.

If both AuthSub and ClientLogin tokens are set, AuthSub takes precedence. If an AuthSub key is set, then secure AuthSub authentication is used, and the request is signed. Requests must be signed only with the private key corresponding to the public key registered with Google. If an AuthSub key is set, but openssl support is not enabled in the PHP installation, an exception is thrown.

  • return: The processed values in an associative array, using the same names as the params
  • throws: Zend_Gdata_App_Exception if there was a signing failure
  • access: public
array filterHttpRequest (string $method, string $url, [array $headers = array()], [string $body = null], [string $contentType = null])
  • string $method: The HTTP method
  • string $url: The URL
  • array $headers: An associate array of headers to be sent with the request or null
  • string $body: The body of the request or null
  • string $contentType: The MIME content type of the body or null
filterHttpResponse (line 243)

Method for filtering the HTTP response, though no filtering is currently done.

  • return: The filterd response object
  • access: public
Zend_Http_Response filterHttpResponse (Zend_Http_Response $response)
getAuthSubPrivateKeyId (line 135)

Gets the openssl private key id

  • return: The private key
  • access: public
string getAuthSubPrivateKeyId ()
getAuthSubToken (line 144)

Gets the AuthSub token used for authentication

  • return: The token
  • access: public
string getAuthSubToken ()
getClientLoginToken (line 164)

Gets the ClientLogin token used for authentication

  • return: The token
  • access: public
string getClientLoginToken ()
setAuthSubPrivateKey (line 118)

Sets the PEM formatted private key to be used for secure AuthSub auth.

In order to call this method, openssl must be enabled in your PHP installation. Otherwise, a Zend_Gdata_App_InvalidArgumentException will be thrown.

  • return: Provides a fluent interface
  • throws: Zend_Gdata_App_InvalidArgumentException
  • access: public
Zend_Gdata_HttpClient setAuthSubPrivateKey (string $key, [string $passphrase = null])
  • string $key: The private key
  • string $passphrase: The optional private key passphrase
setAuthSubPrivateKeyFile (line 95)

Sets the PEM formatted private key, as read from a file.

This method reads the file and then calls setAuthSubPrivateKey() with the file contents.

  • access: public
void setAuthSubPrivateKeyFile (string $file, [string $passphrase = null], [bool $useIncludePath = false])
  • string $file: The location of the file containing the PEM key
  • string $passphrase: The optional private key passphrase
  • bool $useIncludePath: Whether to search the include_path for the file
setAuthSubToken (line 154)

Sets the AuthSub token used for authentication

  • return: Provides a fluent interface
  • access: public
Zend_Gdata_HttpClient setAuthSubToken (string $token)
  • string $token: The token
setClientLoginToken (line 174)

Sets the ClientLogin token used for authentication

  • return: Provides a fluent interface
  • access: public
Zend_Gdata_HttpClient setClientLoginToken (string $token)
  • string $token: The token

Inherited Methods

Inherited From Zend_Http_Client

 Zend_Http_Client::__construct()
 Zend_Http_Client::encodeAuthHeader()
 Zend_Http_Client::encodeFormData()
 Zend_Http_Client::getCookieJar()
 Zend_Http_Client::getHeader()
 Zend_Http_Client::getLastRequest()
 Zend_Http_Client::getLastResponse()
 Zend_Http_Client::getRedirectionsCount()
 Zend_Http_Client::getUri()
 Zend_Http_Client::request()
 Zend_Http_Client::resetParameters()
 Zend_Http_Client::setAdapter()
 Zend_Http_Client::setAuth()
 Zend_Http_Client::setConfig()
 Zend_Http_Client::setCookie()
 Zend_Http_Client::setCookieJar()
 Zend_Http_Client::setEncType()
 Zend_Http_Client::setFileUpload()
 Zend_Http_Client::setHeaders()
 Zend_Http_Client::setMethod()
 Zend_Http_Client::setParameterGet()
 Zend_Http_Client::setParameterPost()
 Zend_Http_Client::setRawData()
 Zend_Http_Client::setUri()
 Zend_Http_Client::_detectFileMimeType()
 Zend_Http_Client::_getParametersRecursive()
 Zend_Http_Client::_prepareBody()
 Zend_Http_Client::_prepareHeaders()
 Zend_Http_Client::_setParameter()
Class Constants

Documentation generated on Mon, 19 Jan 2009 19:03:02 +0300 by phpDocumentor 1.4.2