Zend Framework  1.12
Static Public Member Functions | Public Attributes | List of all members
Zend_Gdata_AuthSub Class Reference

Static Public Member Functions

static getAuthSubTokenUri ($next, $scope, $secure=0, $session=0, $request_uri=self::AUTHSUB_REQUEST_URI)
 Creates a URI to request a single-use AuthSub token.
 
static getAuthSubSessionToken ($token, $client=null, $request_uri=self::AUTHSUB_SESSION_TOKEN_URI)
 Upgrades a single use token to a session token.
 
static AuthSubRevokeToken ($token, $client=null, $request_uri=self::AUTHSUB_REVOKE_TOKEN_URI)
 Revoke a token.
 
static getAuthSubTokenInfo ($token, $client=null, $request_uri=self::AUTHSUB_TOKEN_INFO_URI)
 get token information
 
static getHttpClient ($token, $client=null)
 Retrieve a HTTP client object with AuthSub credentials attached as the Authorization header.
 

Public Attributes

const AUTHSUB_REQUEST_URI = 'https://www.google.com/accounts/AuthSubRequest'
 
const AUTHSUB_SESSION_TOKEN_URI = 'https://www.google.com/accounts/AuthSubSessionToken'
 
const AUTHSUB_REVOKE_TOKEN_URI = 'https://www.google.com/accounts/AuthSubRevokeToken'
 
const AUTHSUB_TOKEN_INFO_URI = 'https://www.google.com/accounts/AuthSubTokenInfo'
 

Member Function Documentation

static AuthSubRevokeToken (   $token,
  $client = null,
  $request_uri = self::AUTHSUB_REVOKE_TOKEN_URI 
)
static

Revoke a token.

Parameters
string$tokenThe token to revoke
Zend_Http_Client$client(optional) HTTP client to use to make the request
string$request_uri(optional) URI to which to direct the revokation request
Returns
boolean Whether the revokation was successful
Exceptions
Zend_Gdata_App_HttpException
static getAuthSubSessionToken (   $token,
  $client = null,
  $request_uri = self::AUTHSUB_SESSION_TOKEN_URI 
)
static

Upgrades a single use token to a session token.

Parameters
string$tokenThe single use token which is to be upgraded
Zend_Http_Client$client(optional) HTTP client to use to make the request
string$request_uri(optional) URI to which to direct the session token upgrade
Returns
string The upgraded token value
Exceptions
Zend_Gdata_App_AuthException
Zend_Gdata_App_HttpException
static getAuthSubTokenInfo (   $token,
  $client = null,
  $request_uri = self::AUTHSUB_TOKEN_INFO_URI 
)
static

get token information

Parameters
string$tokenThe token to retrieve information about
Zend_Http_Client$client(optional) HTTP client to use to make the request
string$request_uri(optional) URI to which to direct the information request
static getAuthSubTokenUri (   $next,
  $scope,
  $secure = 0,
  $session = 0,
  $request_uri = self::AUTHSUB_REQUEST_URI 
)
static

Creates a URI to request a single-use AuthSub token.

Parameters
string$next(required) URL identifying the service to be accessed. The resulting token will enable access to the specified service only. Some services may limit scope further, such as read-only access.
string$scope(required) URL identifying the service to be accessed. The resulting token will enable access to the specified service only. Some services may limit scope further, such as read-only access.
int$secure(optional) Boolean flag indicating whether the authentication transaction should issue a secure token (1) or a non-secure token (0). Secure tokens are available to registered applications only.
int$session(optional) Boolean flag indicating whether the one-time-use token may be exchanged for a session token (1) or not (0).
string$request_uri(optional) URI to which to direct the authentication request.
static getHttpClient (   $token,
  $client = null 
)
static

Retrieve a HTTP client object with AuthSub credentials attached as the Authorization header.

Parameters
string$tokenThe token to retrieve information about
Zend_Gdata_HttpClient$client(optional) HTTP client to use to make the request

Member Data Documentation

const AUTHSUB_REQUEST_URI = 'https://www.google.com/accounts/AuthSubRequest'
const AUTHSUB_REVOKE_TOKEN_URI = 'https://www.google.com/accounts/AuthSubRevokeToken'
const AUTHSUB_SESSION_TOKEN_URI = 'https://www.google.com/accounts/AuthSubSessionToken'
const AUTHSUB_TOKEN_INFO_URI = 'https://www.google.com/accounts/AuthSubTokenInfo'