scream78 / oauth

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

[Java] Google scope parameter for request token #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I try to contact Google for a request token I got following message:

/-------------------------------------------------
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=UTF-8
Date: Mon, 06 Oct 2008 12:40:03 GMT
X-Content-Type-Options: nosniff
Expires: Mon, 06 Oct 2008 12:40:03 GMT
Cache-Control: private, max-age=0
Content-Length: 48
Server: GFE/1.3

parameter_absent
oauth_parameters_absent:scope
/-------------------------------------------------

/-------------------------------------------------
My request message, like it is:
https://www.google.com/accounts/OAuthGetRequestToken?
oauth_consumer_key=<my consumer key>&
oauth_signature_method=HMAC-SHA1&
oauth_timestamp=1223296800&
oauth_nonce=5407853365278&
oauth_signature=<my signature>
/-------------------------------------------------

/-------------------------------------------------
My request message, like it should be:
https://www.google.com/accounts/OAuthGetRequestToken?
oauth_consumer_key=<my consumer key>&
oauth_signature_method=HMAC-SHA1&
oauth_timestamp=1223296800&
oauth_nonce=5407853365278&
oauth_signature=<my signature>&
scope=http://picasaweb.google.com/data
/-------------------------------------------------

And, It makes sense, because the google scope parameter is required.
But, how can I add an required parameter in the request token message??
Theres a method called "addRequiredParameters" in OAuthMessage class that  
append the OAuth required attributes by Spec.. but how about the required
parameters added by Service Provider??

Help guys! XD 

Original issue reported on code.google.com by paulovittor23 on 6 Oct 2008 at 12:59

GoogleCodeExporter commented 9 years ago
Fixed in OAuthClient.java -r685

Original comment by jmkrist...@gmail.com on 22 Oct 2008 at 5:24

GoogleCodeExporter commented 9 years ago

Original comment by jmkrist...@gmail.com on 22 Oct 2008 at 6:21