Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
It seems that passing any parameter that begins with 'oauth_' in the query
string will cause this failure.
Passing other arbitrary parameters work fine (ie, &foo=bar).
Original comment by iza.bill...@gmail.com
on 19 Aug 2010 at 6:41
The reason is that the oauth_callback parameter isn't being added to the query
base string for generating the signature. Only non-oauth parameters are grabbed
from the query string; the oauth paremeters are passed directly, but there
isn't one for oauth_callback.
Basically, this makes it impossible to use 3-legged HMAC-SHA1 with this
library...
Original comment by iza.bill...@gmail.com
on 24 Aug 2010 at 1:49
This patch fixes this particular use case, and is good enough for my needs. It
probably causes other problems I am not aware of however.
Original comment by iza.bill...@gmail.com
on 24 Aug 2010 at 5:31
Attachments:
Original comment by ccherub...@google.com
on 12 Dec 2010 at 1:17
I found the same problem and made the same patch. Can someone comment as to
why the code wants to remove oauth_ query parameters and if there are any
side-effects of removing this check? If the check is useful for normal OAuth
transactions, can explicit support be added for oauth_callback?
I, and I suspect many others, have had to write 3-legged OAuth support. I have
a 200-ish line C# file that is built on the GData Client library that I'd be
happy to contribute.
Original comment by h...@iname.com
on 14 Mar 2011 at 8:42
Sorry, I haven't had time to work on this issue yet, so please attach your
patch for 3-legged OAuth and I'll be glad to review and commit them as soon as
possible.
Original comment by ccherub...@google.com
on 14 Mar 2011 at 8:59
I had problems with this base class too. It was fine when the query parameters
didn't contain reseverd chars but if it did it generated a invalid signature.
So setting ?scope was causing issues.
I might be wrong but I extracted the code and added the following to the
GenerateSignatureBase method
//Url Encode any parameters that may contain reserved characters
foreach (QueryParameter parameter in parameters)
{
parameter.Value = this.UrlEncode(parameter.Value);
}
this ensured that the scope parameter was double escaped in the signature base
string. Therefore setting sorting out the signature.
Don't know if this helps but it sorted my problems.
Original comment by davidsmo...@gmail.com
on 16 Apr 2011 at 2:21
3-legged OAuth support was thoroughly tested prior to releasing our own
implementation in rev. 1123:
http://code.google.com/p/google-gdata/source/detail?r=1123
Original comment by ccherub...@google.com
on 27 Dec 2011 at 4:23
Original issue reported on code.google.com by
iza.bill...@gmail.com
on 19 Aug 2010 at 5:58