Class: Boar::Providers::Dropbox
- Inherits:
-
Base
- Object
- Base
- Boar::Providers::Dropbox
show all
- Defined in:
- lib/boar/providers/dropbox.rb
Instance Method Summary
collapse
Methods inherited from Base
#search_file, #update_credentials
Instance Method Details
#get_credentials(authorizer, request, response) ⇒ Object
16
17
18
19
20
21
22
23
|
# File 'lib/boar/providers/dropbox.rb', line 16
def get_credentials(authorizer, request, response)
begin
@session.get_access_token
{session: @session.serialize}
rescue DropboxAuthError
nil
end
end
|
#redirect_for_authentication(authorizer, configuration) ⇒ Object
10
11
12
13
14
|
# File 'lib/boar/providers/dropbox.rb', line 10
def redirect_for_authentication(authorizer, configuration)
@session = DropboxSession.new(configuration[:app_key], configuration[:app_secret])
@session.get_request_token
@session.get_authorize_url + "&oauth_callback=#{authorizer.callback_url}"
end
|