From ad06b03facde0ce1d8712aaac7499607d5481a21 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Mon, 1 Feb 2021 11:48:43 +0500 Subject: [PATCH] Reverting pyjwt latest version. Causing issues in IDAs. (#97) * Reverting pyjwt latest version. Causing issues in IDAs. * Reverting pyjwt latest version. Causing issues in IDAs. --- CHANGELOG.rst | 8 ++++++++ auth_backends/__init__.py | 2 +- auth_backends/backends.py | 2 +- requirements/base.txt | 7 +++++-- requirements/ci.txt | 4 ++-- requirements/constraints.txt | 5 +++++ requirements/dev.txt | 13 ++++++++----- requirements/pip.txt | 2 +- requirements/test.txt | 13 ++++++++----- 9 files changed, 39 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4196999f..fccd7120 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,14 @@ Unreleased * +[3.1.2] - 2021-01-25 +-------------------- + +Changed +~~~~~ + +* Reverting pyjwt latest version. It was causing issues in IDAs. + [3.1.1] - 2021-01-25 -------------------- diff --git a/auth_backends/__init__.py b/auth_backends/__init__.py index 90768a90..d02b8749 100644 --- a/auth_backends/__init__.py +++ b/auth_backends/__init__.py @@ -3,4 +3,4 @@ These package is designed to be used primarily with Open edX Django projects, but should be compatible with non-edX projects as well. """ -__version__ = '3.3.1' # pragma: no cover +__version__ = '3.3.2' # pragma: no cover diff --git a/auth_backends/backends.py b/auth_backends/backends.py index 0c6c67be..1b58c07e 100644 --- a/auth_backends/backends.py +++ b/auth_backends/backends.py @@ -100,7 +100,7 @@ def auth_complete(self, *args, **kwargs): return user def user_data(self, access_token, *args, **kwargs): - decoded_access_token = jwt.decode(access_token, options={"verify_signature": False}) + decoded_access_token = jwt.decode(access_token, verify=False) keys = list(self.CLAIMS_TO_DETAILS_KEY_MAP.keys()) + ['administrator', 'superuser'] user_data = {key: decoded_access_token[key] for key in keys if key in decoded_access_token} diff --git a/requirements/base.txt b/requirements/base.txt index 84d78047..64677f7f 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -28,8 +28,9 @@ oauthlib==3.1.0 # social-auth-core pycparser==2.20 # via cffi -pyjwt==2.0.1 +pyjwt==1.7.1 # via + # -c requirements/constraints.txt # -r requirements/base.in # social-auth-core python3-openid==3.2.0 @@ -47,10 +48,12 @@ six==1.15.0 # -r requirements/base.in # cryptography # social-auth-app-django + # social-auth-core social-auth-app-django==4.0.0 # via -r requirements/base.in -social-auth-core==4.0.3 +social-auth-core==4.0.2 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in # social-auth-app-django sqlparse==0.4.1 diff --git a/requirements/ci.txt b/requirements/ci.txt index 542dea28..099b2acb 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -22,7 +22,7 @@ filelock==3.0.12 # virtualenv idna==2.10 # via requests -packaging==20.8 +packaging==20.9 # via tox pluggy==0.13.1 # via tox @@ -46,5 +46,5 @@ tox==3.21.3 # tox-battery urllib3==1.26.3 # via requests -virtualenv==20.4.0 +virtualenv==20.4.1 # via tox diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 4179b9b1..51c65a3e 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -11,3 +11,8 @@ # This file contains all common constraints for edx-repos -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + + + +# greater versions causing failures in IDAs. +pyjwt==1.7.1 diff --git a/requirements/dev.txt b/requirements/dev.txt index 8a0b7a0b..f6b6260c 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -107,7 +107,7 @@ isort==5.7.0 # via # -r requirements/test.txt # pylint -jinja2==2.11.2 +jinja2==2.11.3 # via # -r requirements/test.txt # code-annotations @@ -132,7 +132,7 @@ oauthlib==3.1.0 # -r requirements/test.txt # requests-oauthlib # social-auth-core -packaging==20.8 +packaging==20.9 # via # -r requirements/ci.txt # -r requirements/test.txt @@ -168,8 +168,9 @@ pycryptodomex==3.9.9 # pyjwkest pyjwkest==1.4.2 # via -r requirements/test.txt -pyjwt==2.0.1 +pyjwt==1.7.1 # via + # -c requirements/constraints.txt # -r requirements/test.txt # social-auth-core pylint-celery==0.3 @@ -243,13 +244,15 @@ six==1.15.0 # edx-lint # pyjwkest # social-auth-app-django + # social-auth-core # tox # unittest2 # virtualenv social-auth-app-django==4.0.0 # via -r requirements/test.txt -social-auth-core==4.0.3 +social-auth-core==4.0.2 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt # social-auth-app-django sqlparse==0.4.1 @@ -289,7 +292,7 @@ urllib3==1.26.3 # -r requirements/ci.txt # -r requirements/test.txt # requests -virtualenv==20.4.0 +virtualenv==20.4.1 # via # -r requirements/ci.txt # -r requirements/test.txt diff --git a/requirements/pip.txt b/requirements/pip.txt index 1edc48fe..0f1cf90a 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -8,7 +8,7 @@ wheel==0.36.2 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==21.0 +pip==21.0.1 # via -r requirements/pip.in setuptools==52.0.0 # via -r requirements/pip.in diff --git a/requirements/test.txt b/requirements/test.txt index d70900b7..4650ad42 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -73,7 +73,7 @@ iniconfig==1.1.1 # via pytest isort==5.7.0 # via pylint -jinja2==2.11.2 +jinja2==2.11.3 # via code-annotations lazy-object-proxy==1.4.3 # via astroid @@ -88,7 +88,7 @@ oauthlib==3.1.0 # -r requirements/base.txt # requests-oauthlib # social-auth-core -packaging==20.8 +packaging==20.9 # via # pytest # tox @@ -112,8 +112,9 @@ pycryptodomex==3.9.9 # via pyjwkest pyjwkest==1.4.2 # via -r requirements/test.in -pyjwt==2.0.1 +pyjwt==1.7.1 # via + # -c requirements/constraints.txt # -r requirements/base.txt # social-auth-core pylint-celery==0.3 @@ -170,13 +171,15 @@ six==1.15.0 # edx-lint # pyjwkest # social-auth-app-django + # social-auth-core # tox # unittest2 # virtualenv social-auth-app-django==4.0.0 # via -r requirements/base.txt -social-auth-core==4.0.3 +social-auth-core==4.0.2 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt # social-auth-app-django sqlparse==0.4.1 @@ -202,7 +205,7 @@ urllib3==1.26.3 # via # -r requirements/base.txt # requests -virtualenv==20.4.0 +virtualenv==20.4.1 # via tox wrapt==1.12.1 # via astroid