Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Include explicitely PyJWT in requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Muñoz Cárdenas committed Jun 12, 2018
1 parent d0d0957 commit 1266b9d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion oauth2_provider_jwt/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def authenticate(self, request):

try:
payload = decode_jwt(jwt_value)
except jwt.ExpiredSignature:
except jwt.ExpiredSignatureError:
msg = 'Signature has expired.'
raise exceptions.AuthenticationFailed(msg)
except jwt.DecodeError:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
cryptography>=2.2.2,<2.3
PyJWT>=1.6.4,<1.7
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def test_decode_jwt_expired(self):
payload['exp'] = now - timedelta(seconds=1)
payload['iat'] = now
jwt_value = utils.encode_jwt(payload)
self.assertRaises(jwt.ExpiredSignature, utils.decode_jwt,
self.assertRaises(jwt.ExpiredSignatureError, utils.decode_jwt,
jwt_value)

def test_decode_jwt(self):
Expand Down

0 comments on commit 1266b9d

Please sign in to comment.