diff options
author | Grey Li <withlihui@gmail.com> | 2017-11-14 23:38:33 +0800 |
---|---|---|
committer | Omer Katz <omer.drow@gmail.com> | 2017-11-14 17:38:33 +0200 |
commit | fa0b63cfaced831d8b916c5a125128f582acf044 (patch) | |
tree | b7216220b444b542d1effb68e76e513666584553 /oauthlib | |
parent | 4b85d90a54572f54b8b19d036d76d043cf116699 (diff) | |
download | oauthlib-fa0b63cfaced831d8b916c5a125128f582acf044.tar.gz |
Check access token in self.token dict (#500)
* Check access token in self.token dict
* fix typo
Diffstat (limited to 'oauthlib')
-rw-r--r-- | oauthlib/oauth2/rfc6749/clients/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oauthlib/oauth2/rfc6749/clients/base.py b/oauthlib/oauth2/rfc6749/clients/base.py index c2f8809..5c5acee 100644 --- a/oauthlib/oauth2/rfc6749/clients/base.py +++ b/oauthlib/oauth2/rfc6749/clients/base.py @@ -186,7 +186,7 @@ class Client(object): if not self.token_type.lower() in case_insensitive_token_types: raise ValueError("Unsupported token type: %s" % self.token_type) - if not self.access_token: + if not (self.access_token or self.token.get('access_token')): raise ValueError("Missing access token.") if self._expires_at and self._expires_at < time.time(): |