diff options
author | Jonathan Huot <JonathanHuot@users.noreply.github.com> | 2018-12-11 10:17:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-11 10:17:02 +0100 |
commit | a4dd9cb805902cb71db658354dbe294cbb4cdbde (patch) | |
tree | 802064a6fa1577805bf7f3d2284553fa15fa0a04 | |
parent | cf3cf407be774405f66188219eb1653c723e294b (diff) | |
parent | 51c927b0641adcef6e5944c9a67ba1d7edc2eb68 (diff) | |
download | oauthlib-a4dd9cb805902cb71db658354dbe294cbb4cdbde.tar.gz |
Merge branch 'master' into 601-pkce-support
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | .travis.yml | 8 | ||||
-rw-r--r-- | oauthlib/oauth2/rfc6749/errors.py | 4 | ||||
-rwxr-xr-x | setup.py | 1 | ||||
-rw-r--r-- | tests/oauth2/rfc6749/grant_types/test_refresh_token.py | 2 | ||||
-rw-r--r-- | tox.ini | 2 |
6 files changed, 14 insertions, 5 deletions
@@ -1,4 +1,5 @@ *.pyc +.idea *.sublime-project *.sublime-workspace *.swp @@ -22,6 +23,7 @@ develop-eggs pip-log.txt # Unit test / coverage reports +.cache .coverage .tox coverage diff --git a/.travis.yml b/.travis.yml index f46bf43..e304ce6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ language: python +python: 3.7 +dist: xenial sudo: false cache: pip matrix: @@ -11,8 +13,10 @@ matrix: env: TOXENV=py35 - python: 3.6 env: TOXENV=py36 - - python: pypy-5.3 - env: TOXENV=pypy + - python: 3.7 + env: TOXENV=py37 + - python: pypy3.5 + env: TOXENV=pypy3 install: - pip install -U setuptools - pip install tox coveralls diff --git a/oauthlib/oauth2/rfc6749/errors.py b/oauthlib/oauth2/rfc6749/errors.py index f7fac5c..bee9e77 100644 --- a/oauthlib/oauth2/rfc6749/errors.py +++ b/oauthlib/oauth2/rfc6749/errors.py @@ -231,9 +231,11 @@ class UnsupportedCodeChallengeMethodError(InvalidRequestError): class InvalidScopeError(OAuth2Error): """ The requested scope is invalid, unknown, or malformed. + + https://tools.ietf.org/html/rfc6749#section-5.2 """ error = 'invalid_scope' - status_code = 401 + status_code = 400 class ServerError(OAuth2Error): @@ -64,6 +64,7 @@ setup( 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: Implementation', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', diff --git a/tests/oauth2/rfc6749/grant_types/test_refresh_token.py b/tests/oauth2/rfc6749/grant_types/test_refresh_token.py index f055c7d..32a0977 100644 --- a/tests/oauth2/rfc6749/grant_types/test_refresh_token.py +++ b/tests/oauth2/rfc6749/grant_types/test_refresh_token.py @@ -99,7 +99,7 @@ class RefreshTokenGrantTest(TestCase): token = json.loads(body) self.assertEqual(self.mock_validator.save_token.call_count, 0) self.assertEqual(token['error'], 'invalid_scope') - self.assertEqual(status_code, 401) + self.assertEqual(status_code, 400) def test_invalid_token(self): self.mock_validator.validate_refresh_token.return_value = False @@ -1,5 +1,5 @@ [tox] -envlist = py27,py34,py35,py36,pypy,docs,readme +envlist = py27,py34,py35,py36,py37,pypy,pypy3,docs,readme [testenv] deps= |