summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqporest <ihor.husar@gmail.com>2019-07-02 15:31:51 -0400
committerGitHub <noreply@github.com>2019-07-02 15:31:51 -0400
commit34166c5182871b53b2761dd8fae00aaec611a7d3 (patch)
tree374aa6d9ce6b2d849dcfb8651ec0c57afbdeadd5
parent76d8d3426004e3a14d372444c56f764ad71937e0 (diff)
downloadoauthlib-34166c5182871b53b2761dd8fae00aaec611a7d3.tar.gz
Fix BackendApplicationClient.prepare_request_body
Currently, if no `scope` is passed to `prepare_request_body`, None will be passed on to `prepare_token_request`, even if BackendApplicationClient was initialized with `scope`.
-rw-r--r--oauthlib/oauth2/rfc6749/clients/backend_application.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/oauthlib/oauth2/rfc6749/clients/backend_application.py b/oauthlib/oauth2/rfc6749/clients/backend_application.py
index 2483e56..5737814 100644
--- a/oauthlib/oauth2/rfc6749/clients/backend_application.py
+++ b/oauthlib/oauth2/rfc6749/clients/backend_application.py
@@ -71,5 +71,6 @@ class BackendApplicationClient(Client):
"""
kwargs['client_id'] = self.client_id
kwargs['include_client_id'] = include_client_id
+ scope = self.scope if scope is None else scope
return prepare_token_request(self.grant_type, body=body,
scope=scope, **kwargs)