diff options
author | mlboy <mlboy@126.com> | 2018-12-12 11:48:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-12 11:48:13 +0800 |
commit | 4f2c7adcc0eba360054d27f48728bb47206a96d3 (patch) | |
tree | 83a041ec27d1820205135cc2ec39b57e05482250 | |
parent | 84389ac54ff195dabe4a0aa834598972b569f4f7 (diff) | |
download | oauthlib-4f2c7adcc0eba360054d27f48728bb47206a96d3.tar.gz |
change: grant_type as attribute
-rw-r--r-- | oauthlib/oauth2/rfc6749/clients/web_application.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/oauthlib/oauth2/rfc6749/clients/web_application.py b/oauthlib/oauth2/rfc6749/clients/web_application.py index 487e3a0..0cd39ce 100644 --- a/oauthlib/oauth2/rfc6749/clients/web_application.py +++ b/oauthlib/oauth2/rfc6749/clients/web_application.py @@ -34,6 +34,8 @@ class WebApplicationClient(Client): browser) and capable of receiving incoming requests (via redirection) from the authorization server. """ + + grant_type = 'authorization_code' def __init__(self, client_id, code=None, **kwargs): super(WebApplicationClient, self).__init__(client_id, **kwargs) @@ -151,7 +153,7 @@ class WebApplicationClient(Client): kwargs['client_id'] = self.client_id kwargs['include_client_id'] = include_client_id - return prepare_token_request('authorization_code', code=code, body=body, + return prepare_token_request(self.grant_type, code=code, body=body, redirect_uri=redirect_uri, **kwargs) def parse_request_uri_response(self, uri, state=None): |