python-oauth2 icon indicating copy to clipboard operation
python-oauth2 copied to clipboard

Simple change that allows parameters to be passed in to Client.request()

Open jskitz opened this issue 14 years ago • 0 comments

Essentially, the problem I was experiencing is that django-piston 0.3 forces the oauth_callback parameter to be sent on requesting a token, as is specified in the OAuth 1.0a specification. However, in the sample Client code, there seemed to be no way to get this to work with the current python-oauth2 code. If I passed oauth_callback parameters in via the body, django-piston would fail (could be a bug from django-piston). So essentially, this change just adds a keyword argument parameters={}, which defaults to an empty dictionary, and is updated with parameters from the body if present. This change, I believe is 2 lines of code total, and makes the client code much more extensible in terms of adding non-OAuth parameters as well in the workflow.

jskitz avatar Mar 08 '11 22:03 jskitz