Class: DropboxApi::Authenticator

Inherits:
OAuth2::Client
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/dropbox_api/authenticator.rb

Instance Method Summary collapse

Constructor Details

#initialize(client_id, client_secret) ⇒ Authenticator

Returns a new instance of Authenticator.



7
8
9
10
11
12
# File 'lib/dropbox_api/authenticator.rb', line 7

def initialize(client_id, client_secret)
  @auth_code = OAuth2::Client.new(client_id, client_secret, {
    :authorize_url => 'https://www.dropbox.com/oauth2/authorize',
    :token_url => 'https://api.dropboxapi.com/oauth2/token'
  }).auth_code
end