class GoogleDirectory::Config
Attributes
admin_email[R]
application_name[R]
application_version[R]
issuer[R]
key_file[R]
key_passphrase[R]
scope_name[R]
Public Class Methods
new(scope_name = :main)
click to toggle source
# File lib/google-directory/config.rb, line 31 def initialize(scope_name = :main) @scope_name = scope_name @application_name = 'Google Directory API' @application_version = GoogleDirectory::VERSION end
Public Instance Methods
load_token()
click to toggle source
# File lib/google-directory/config.rb, line 52 def load_token @token_store and @token_store.load(@scope_name) end
save_token(token_hash)
click to toggle source
token_type: issued_at: access_token: expires_in:
# File lib/google-directory/config.rb, line 47 def save_token(token_hash) token_hash = token_hash.slice('token_type', 'issued_at', 'access_token', 'expires_in') @token_store and @token_store.save(@scope_name, token_hash) end
using(scope)
click to toggle source
# File lib/google-directory/config.rb, line 37 def using(scope) @scopes[scope] end