Jeff-Lewis / oauth-php

Automatically exported from code.google.com/p/oauth-php
MIT License
0 stars 0 forks source link

Param $oauth_as_header is not configurable for call getQueryString on OAuthRequester.php #118

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Make an request_token using 2Leg

What is the expected output? What do you see instead?
The result of request_token. But i receive "failed with code 401: OAuth 
Verification Failed: Can't verify request, missing oauth_consumer_key or 
oauth_token."

What version of the product are you using? On what operating system?
oauth-php-175 on Linux

Please provide any additional information below.
After a lot of time waste on try a simple test with 2Leg request_token i 
realized that all of my request to my OAuth server was going without the data 
on GET OR POST queryString. All of the data 
(oauth_consumer_key,oauth_consumer_signed,....) was going on Request header. 
Making then to my OAuth Server don't recognize the request.

I modified the file OAuthRequester.php on 331 line. When is "$query     = 
$this->getQueryString();" i changed to "$query      = $this->getQueryString(true);"
And this solved my problem, because now the oauth data is being sending on 
Request body and no longer only on Request header.

I think that this should be configurable, but the way that are ... all of the 
request will always go without oauth data on request body.

Original issue reported on code.google.com by elielso...@gmail.com on 26 Oct 2011 at 2:42

GoogleCodeExporter commented 9 years ago
Sorry ... i changed the "$query     = $this->getQueryString();" to "$query      = 
$this->getQueryString(false);"

Because on the function getQueryString on OAuthRequestSigner.php have a default 
param set to true.

Original comment by elielso...@gmail.com on 26 Oct 2011 at 2:45

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Same issue here with the same fix. Why is this setting not available in the API 
of the library? My guess is nobody uses the 2-legged OAuth.

Original comment by matt.ca...@visualrevenue.com on 16 Apr 2013 at 2:55