summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Huot <JonathanHuot@users.noreply.github.com>2018-12-11 10:17:02 +0100
committerGitHub <noreply@github.com>2018-12-11 10:17:02 +0100
commita4dd9cb805902cb71db658354dbe294cbb4cdbde (patch)
tree802064a6fa1577805bf7f3d2284553fa15fa0a04
parentcf3cf407be774405f66188219eb1653c723e294b (diff)
parent51c927b0641adcef6e5944c9a67ba1d7edc2eb68 (diff)
downloadoauthlib-a4dd9cb805902cb71db658354dbe294cbb4cdbde.tar.gz
Merge branch 'master' into 601-pkce-support
-rw-r--r--.gitignore2
-rw-r--r--.travis.yml8
-rw-r--r--oauthlib/oauth2/rfc6749/errors.py4
-rwxr-xr-xsetup.py1
-rw-r--r--tests/oauth2/rfc6749/grant_types/test_refresh_token.py2
-rw-r--r--tox.ini2
6 files changed, 14 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 6f24649..a3f5614 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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):
diff --git a/setup.py b/setup.py
index 640bbe1..d2a27a0 100755
--- a/setup.py
+++ b/setup.py
@@ -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
diff --git a/tox.ini b/tox.ini
index c45f657..47237d8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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=