Support Callback for Dropbox#287
Conversation
visible difference is that the callback URL is passed within the authorization request. This Patch includes a new Api10 and a corresponding OAuth10ServiceImpl with above change concerning the callback URL.
|
Why is this even needed. I thought scribe worked well with Dropbox :S |
|
It (repository/not latest release) works well but for the callback to redirect the user to after the authentication. (see also #203 (comment)) |
|
And ~300 lines of code for that? Why can't you just do: String url = service.getAuthenticationUrl() + "callback=foobar.com";Or something like that? |
|
The number of lines is caused by the new DefaultApi10 and OAuth10ServiceImpl, which are modified copies of DefaultApi10a and OAuth10aServiceImpl. I really like scribe because of the ease of use (with the exception of the callback it just worked!) and thus have modified my copy in the above way to make Dropbox as easy to use as other services. As I usually share my modifications to open source software if they could be useful to others, I decided to create the pull request (which is really easy with GitHub) to let you (as the author of this great library) know. |
|
Thanks a lot for the pull request. In this case, I'd rather have a one line hacky string concatenation on the client than 300 lines of code in the library. Sorry. |
Dropbox uses the OAuth 1.0 API, not the OAuth Revision A API - the main difference is that the callback URL is passed within the authorization request.
This Patch includes a new DefaultApi10 and a corresponding OAuth10ServiceImpl with above changes vs. the 10a files concerning the callback URL.
The DropboxApi inherits from the DefaultApi10 and includes the callback in the authorization URL.