From 1f4de55764210136c0c509df4783b1af10e7d702 Mon Sep 17 00:00:00 2001 From: Sander Tuit Date: Thu, 14 Jan 2021 09:03:17 +0100 Subject: [PATCH 1/2] Add dependency on and compatibility with PyJWT 2.0 --- django_auth_adfs/backend.py | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/django_auth_adfs/backend.py b/django_auth_adfs/backend.py index 946352e..c203172 100644 --- a/django_auth_adfs/backend.py +++ b/django_auth_adfs/backend.py @@ -68,7 +68,7 @@ def validate_access_token(self, access_token): issuer=provider_config.issuer, options=options, ) - except jwt.ExpiredSignature as error: + except jwt.ExpiredSignatureError as error: logger.info("Signature has expired: %s", error) raise PermissionDenied except jwt.DecodeError as error: diff --git a/setup.py b/setup.py index d056900..3cdada0 100644 --- a/setup.py +++ b/setup.py @@ -44,9 +44,9 @@ 'Development Status :: 5 - Production/Stable', ], install_requires=[ - 'pyjwt >= 1.0.1', + 'pyjwt>=2.0', 'cryptography>=1.7', - 'django >= 1.11', + 'django>=1.11', 'requests', ], tests_require=[ From f454be014d73f43a6ab19352abaf435df0931c4d Mon Sep 17 00:00:00 2001 From: Sander Tuit Date: Fri, 15 Jan 2021 10:15:18 +0100 Subject: [PATCH 2/2] Revert unnecessary PyJWT dependency bump --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 3cdada0..d056900 100644 --- a/setup.py +++ b/setup.py @@ -44,9 +44,9 @@ 'Development Status :: 5 - Production/Stable', ], install_requires=[ - 'pyjwt>=2.0', + 'pyjwt >= 1.0.1', 'cryptography>=1.7', - 'django>=1.11', + 'django >= 1.11', 'requests', ], tests_require=[