Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
-----

This fork has an upgraded PyJWT version: 1.7.1 -> 2.4.0

=====
PythX
=====
Expand Down
2 changes: 1 addition & 1 deletion pythx/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def _get_jwt_expiration_ts(token: str) -> datetime:
:param token: The JWT to perform the check on
:return: The UTC expiration datetime object
"""
return datetime.utcfromtimestamp((jwt.decode(token, verify=False)["exp"]))
return datetime.utcfromtimestamp((jwt.decode(token, algorithms=["HS256"], options={"verify_signature": False})["exp"]))

def assert_authentication(self) -> None:
"""Make sure the user is authenticated.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
python-dateutil==2.8.1
inflection==0.5.1
PyJWT==1.7.1
PyJWT==2.4.0
requests==2.25.1
mythx-models==2.2.0