Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

OAuth2 Auth Flow #67

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

OAuth2 Auth Flow #67

wants to merge 12 commits into from

Conversation

joallard
Copy link

@joallard joallard commented Jul 8, 2015

A quick-and-dirty flow dependent on #62, I'll update the Readme and finalize the patch once #62 is in. Will rebase on demand.

The auth would be simplified to be:

authorize_uri = ::Dropbox::API::OAuth2::AuthFlow.start
# get code
access_token = ::Dropbox::API::OAuth2::AuthFlow.finish(code)

And done.

disbelief and others added 12 commits May 8, 2014 16:46
…a the `auth_type` configuration setting, defaults to "oauth"
Data should be passed as parameters in the body of the request instead
of converting it into query string params. Query string will work for
smaller amounts of data, but errors arise when the query string becomes
too long. For example this is often the case when requesting deltas
using a long cursor string.
Some notes:

- I had to modify the logic in one Dropbox::API::Client#delta test
  because in my tests the last item returned by the delta API was
  actually the `test_dir` itself, not the file within it. I made the
  test flexible enough to handle either case: "file last" or "dir
  last".

- Added a `type` key to connection.yml to indicate that the token
  provided is either "oauth2" or "oauth1". When ommitted, "oauth1"
  is assumed.

- Alternatively ENV['AUTH']=oauth2 can be set when running the tests.
  This will override whatever is specified in connection.yml

- I think ideally the spec would run all of the tests twice: once
  with an OAuth1 token and once with OAuth2, but that's a bit more than
  I have time for.
@ivanovaleksey
Copy link

Can it be merged?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants