Parent

Class/Module Index [+]

Quicksearch

Google::APIClient::FileStorage

Represents cached OAuth 2 tokens stored on local disk in a JSON serialized file. Meant to resemble the serialized format google-api-python-client.googlecode.com/hg/docs/epy/oauth2client.file.Storage-class.html

@deprecated

Use {Google::APIClient::Storage} and {Google::APIClient::FileStore} instead

Attributes

storage[RW]

Public Class Methods

new(path) click to toggle source
# File lib/google/api_client/auth/file_storage.rb, line 34
def initialize(path)
  store = Google::APIClient::FileStore.new(path)
  @storage = Google::APIClient::Storage.new(store)
  @storage.authorize
end

Public Instance Methods

authorization() click to toggle source
# File lib/google/api_client/auth/file_storage.rb, line 44
def authorization
  storage.authorization
end
load_credentials() click to toggle source
# File lib/google/api_client/auth/file_storage.rb, line 40
def load_credentials
  storage.authorize
end
write_credentials(auth=nil) click to toggle source

Write the credentials to the specified file.

@param [Signet::OAuth2::Client] authorization

Optional authorization instance. If not provided, the authorization
already associated with this instance will be written.
# File lib/google/api_client/auth/file_storage.rb, line 54
def write_credentials(auth=nil)
  storage.write_credentials(auth)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.