diff options
author | Ib Lundgren <ib.lundgren@gmail.com> | 2014-05-28 14:20:42 +0100 |
---|---|---|
committer | Ib Lundgren <ib.lundgren@gmail.com> | 2014-05-28 14:20:42 +0100 |
commit | 14061935013ae20f58995dd2918c009166010bbc (patch) | |
tree | 427eebd4738c702a7380ca8c508307f1570617e4 | |
parent | f59b02389ec2daa84b75606120057bf5ae8f131a (diff) | |
download | oauthlib-14061935013ae20f58995dd2918c009166010bbc.tar.gz |
Pass request object to oauth1.Client.get_oauth_params.
This makes it much easier to do interesting client customisations which
require extra OAuth params to be included in the signature calculation
as well as in the authorization header.
-rw-r--r-- | oauthlib/oauth1/rfc5849/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/oauthlib/oauth1/rfc5849/__init__.py b/oauthlib/oauth1/rfc5849/__init__.py index 7031d87..b07ef1b 100644 --- a/oauthlib/oauth1/rfc5849/__init__.py +++ b/oauthlib/oauth1/rfc5849/__init__.py @@ -145,7 +145,7 @@ class Client(object): log.debug("Signature: {0}".format(sig)) return sig - def get_oauth_params(self): + def get_oauth_params(self, request): """Get the basic OAuth parameters to be used in generating a signature. """ nonce = (generate_nonce() @@ -280,7 +280,7 @@ class Client(object): raise ValueError('GET/HEAD requests should not include body.') # generate the basic OAuth parameters - request.oauth_params = self.get_oauth_params() + request.oauth_params = self.get_oauth_params(request) # generate the signature request.oauth_params.append(('oauth_signature', self.get_oauth_signature(request))) |