Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception during Integrating with django's oauth2_provider #50

Open
ctippur opened this issue Nov 9, 2015 · 0 comments
Open

Exception during Integrating with django's oauth2_provider #50

ctippur opened this issue Nov 9, 2015 · 0 comments

Comments

@ctippur
Copy link

ctippur commented Nov 9, 2015

Hello,

I would like to thank you for such a nice utility to abstract the complexities of oauth. I have a question on its implementation. This may not be a bug/feature and just a gap in my understanding. If so, please excuse me.

I am trying to use oauth2 authentication via Django's oauth2_provider. I am able to generate token and refresh token via curl.
curl -X POST -d "grant_type=password&username=user1&password=user1&client_secret=${ClientSecret}&client_id=${ClientId}" http://localhost:8000/o/token/

I have set authorization grant type as "resource owner password-based".

When I try to use android-oauth-client, I get a exception. As you can see, the url generated from android-oauth-client is a little different. Can you please point me to any issues in my approach?

900 2212-2212/com.sanabhi.dropboat W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
11-09 02:11:38.907 2212-2212/com.sanabhi.dropboat I/OAuthAndroid: onPageStarted: http://localhost:8000/o/token/?client_id=rXBixkjnYvZf78HUm8Jw17fR2awHgV5nqGHfTAaE&redirect_uri=http://localhost:8000/o/authorize&response_type=token
11-09 02:11:38.907 2212-2212/com.sanabhi.dropboat I/OAuthAndroid: url: http://localhost:8000/o/token/?client_id=rXBixkjnYvZf78HUm8Jw17fR2awHgV5nqGHfTAaE&redirect_uri=http://localhost:8000/o/authorize&response_type=token, redirect: http://localhost:8000/o/authorize, callback: false
11-09 02:11:38.920 2212-9801/com.sanabhi.dropboat W/System.err: java.io.IOException: User authorization failed (net::ERR_CONNECTION_REFUSED)
11-09 02:11:38.920 2212-9801/com.sanabhi.dropboat W/System.err: at com.wuman.android.auth.DialogFragmentController.waitForImplicitResponseUrl(DialogFragmentController.java:189)
11-09 02:11:38.920 2212-9801/com.sanabhi.dropboat W/System.err: at com.wuman.android.auth.OAuthManager$4.doWork(OAuthManager.java:260)
11-09 02:11:38.920 2212-9801/com.sanabhi.dropboat W/System.err: at com.wuman.android.auth.OAuthManager$BaseFutureTask.startTask(OAuthManager.java:420)
11-09 02:11:38.920 2212-9801/com.sanabhi.dropboat W/System.err: at com.wuman.android.auth.OAuthManager$Future2Task.start(OAuthManager.java:443)
11-09 02:11:38.920 2212-9801/com.sanabhi.dropboat W/System.err: at com.wuman.android.auth.OAuthManager$5.run(OAuthManager.java:399)
11-09 02:11:38.921 2212-9801/com.sanabhi.dropboat W/System.err: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
11-09 02:11:38.921 2212-9801/com.sanabhi.dropboat W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-09 02:11:38.921 2212-9801/com.sanabhi.dropboat W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
11-09 02:11:38.921 2212-9801/com.sanabhi.dropboat W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
11-09 02:11:38.921 2212-9801/com.sanabhi.dropboat W/System.err: at java.lang.Thread.run(Thread.java:818)

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

No branches or pull requests

1 participant