diff --git a/README.rst b/README.rst index c5473646f..1a5adcd06 100644 --- a/README.rst +++ b/README.rst @@ -44,7 +44,7 @@ Requirements * Python 3.5+ * Django 2.1+ -* oauthlib 3.0+ +* oauthlib 3.1+ Installation ------------ diff --git a/docs/index.rst b/docs/index.rst index 8716eb90b..5889fff28 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -23,7 +23,7 @@ Requirements * Python 3.5+ * Django 2.1+ -* oauthlib 3.0+ +* oauthlib 3.1+ Index ===== diff --git a/docs/requirements.txt b/docs/requirements.txt index 63d82768f..c1f72699b 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ Django>=3.0,<3.1 -oauthlib>=3.0.1 +oauthlib>=3.1.0 m2r>=0.2.1 . diff --git a/oauth2_provider/views/base.py b/oauth2_provider/views/base.py index 8a3a59c25..b9b6ed7f9 100644 --- a/oauth2_provider/views/base.py +++ b/oauth2_provider/views/base.py @@ -139,16 +139,6 @@ def form_valid(self, form): def get(self, request, *args, **kwargs): try: scopes, credentials = self.validate_authorization_request(request) - # TODO: Remove the two following lines after oauthlib updates its implementation - # https://github.com/jazzband/django-oauth-toolkit/pull/707#issuecomment-485011945 - credentials["code_challenge"] = credentials.get( - "code_challenge", - request.GET.get("code_challenge", None) - ) - credentials["code_challenge_method"] = credentials.get( - "code_challenge_method", - request.GET.get("code_challenge_method", None) - ) except OAuthToolkitError as error: # Application is not available at this time. return self.error_response(error, application=None) @@ -166,8 +156,6 @@ def get(self, request, *args, **kwargs): kwargs["redirect_uri"] = credentials["redirect_uri"] kwargs["response_type"] = credentials["response_type"] kwargs["state"] = credentials["state"] - kwargs["code_challenge"] = credentials["code_challenge"] - kwargs["code_challenge_method"] = credentials["code_challenge_method"] self.oauth2_data = kwargs # following two loc are here only because of https://code.djangoproject.com/ticket/17795 diff --git a/setup.cfg b/setup.cfg index bd15cadca..3c4e0badc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,7 +33,7 @@ zip_safe = False install_requires = django >= 2.1 requests >= 2.13.0 - oauthlib >= 3.0.1 + oauthlib >= 3.1.0 [options.packages.find] exclude = tests diff --git a/tox.ini b/tox.ini index 210106f57..c984f8b99 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ deps = django30: Django>=3.0,<3.1 djangomaster: https://github.com/django/django/archive/master.tar.gz djangorestframework - oauthlib>=3.0.1 + oauthlib>=3.1.0 coverage pytest pytest-cov @@ -39,8 +39,8 @@ basepython = python changedir = docs whitelist_externals = make commands = make html -deps = sphinx - oauthlib>=3.0.1 +deps = sphinx<3 + oauthlib>=3.1.0 m2r>=0.2.1 [testenv:py37-flake8]