vinayapatil / oauth

Automatically exported from code.google.com/p/oauth
0 stars 0 forks source link

Redirects not handled #106

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Set up test for http://oauth-sandbox.sevengoslings.net
2. Request user authz url with token

What is the expected output? What do you see instead?
Expect to get the user authz url. Instead get 

net.oauth.OAuthProblemException: HTTP/1.1 302 Found

What version of the product are you using? On what operating system?
Rev 1052 on Mac OS X

Please provide any additional information below.

Original issue reported on code.google.com by scott.br...@gmail.com on 13 Jun 2009 at 6:50

GoogleCodeExporter commented 8 years ago
This is for the Java library (hmm, why didn't I get an option to specify that?)

Original comment by scott.br...@gmail.com on 13 Jun 2009 at 6:51

GoogleCodeExporter commented 8 years ago
I got the same issue when running the Java command line sample.

new OAuthHelper("cmdline.properties").execute("authorize");

and got the following exception

Exception in thread "main" net.oauth.OAuthProblemException: HTTP/1.1 302 Found
    at
net.oauth.client.OAuthResponseMessage.toOAuthProblemException(OAuthResponseMessa
ge.java:83)
    at net.oauth.client.OAuthClient.invoke(OAuthClient.java:306)
    at net.oauth.client.OAuthClient.invoke(OAuthClient.java:260)
    at net.oauth.example.cmdline.OAuthHelper.sendRequest(OAuthHelper.java:101)
    at net.oauth.example.cmdline.OAuthHelper.execute(OAuthHelper.java:148)
    at net.oauth.example.cmdline.OAuthHelper.main(OAuthHelper.java:57)

Original comment by phamanhv...@gmail.com on 15 Jul 2009 at 5:02

GoogleCodeExporter commented 8 years ago
Actually, for my test, it's working with Twitter API and not working with 
Yammer API.

Original comment by phamanhv...@gmail.com on 15 Jul 2009 at 5:59

GoogleCodeExporter commented 8 years ago

Original comment by leah.culver on 12 Aug 2009 at 9:21

GoogleCodeExporter commented 8 years ago
The caller can handle a redirect: catch the exception, check the HTTP status 
code 
and send another request if it's a redirect.  Don't neglect to sign the new 
request, 
with a fresh timestamp and nonce.

It would be nice to have an option to do this automatically, at least in 
OAuthClient.getRequestToken and getAccessToken.

Original comment by jmkrist...@gmail.com on 23 Aug 2009 at 1:38