Class GData::Auth::AuthSub
In: lib/gdata/auth/authsub.rb
Parent: Object

This class implements AuthSub signatures for Data API requests. It can be used with a GData::Client::GData object.

Methods

get_url   info   new   private_key=   revoke   sign_request!   upgrade  

Constants

REQUEST_HANDLER = 'https://www.google.com/accounts/AuthSubRequest'   The URL of AuthSubRequest.
SESSION_HANDLER = 'https://www.google.com/accounts/AuthSubSessionToken'   The URL of AuthSubSessionToken.
REVOKE_HANDLER = 'https://www.google.com/accounts/AuthSubRevokeToken'   The URL of AuthSubRevokeToken.
INFO_HANDLER = 'https://www.google.com/accounts/AuthSubTokenInfo'   The URL of AuthSubInfo.
BIG_INT_MAX = 18446744073709551616   2 ** 64, the largest 64 bit unsigned integer

Attributes

private_key  [R]  Private RSA key used to sign secure requests.
token  [RW]  AuthSub access token.

Public Class methods

Return the proper URL for an AuthSub approval page with the requested scope. next_url should be a URL that points back to your code that will receive the token. domain is optionally a Google Apps domain.

Initialize the class with a new token. Optionally pass a private key or custom URLs.

Public Instance methods

Return some information about the current token. If the current token is a one-time use token, this operation will use it up!

Set the private key to use with this AuthSub token. The key can be an OpenSSL::PKey::RSA object, a string containing a private key in PEM format, or a string specifying a path to a PEM file that contains the private key.

Revoke the token.

Sign a GData::Http::Request object with a valid AuthSub Authorization header.

Upgrade the current token into a session token.

[Validate]