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

Updated PyJWT version to 2.6.0 #152

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
7 changes: 6 additions & 1 deletion flask_jwt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ def _default_auth_request_handler():


def _default_auth_response_handler(access_token, identity):
return jsonify({'access_token': access_token.decode('utf-8')})
try:
token = access_token.decode('utf-8')
except AttributeError:
# There is no str.decode method in Python 3, so we can use the access token directly
token = access_token
return jsonify({'access_token': token})


def _default_jwt_error_handler(error):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Flask>=0.9
PyJWT>=1.4.0,<1.5.0
PyJWT>=2.6.0