Skip to content

Commit

Permalink
Merge pull request #65 from dmtzs/development
Browse files Browse the repository at this point in the history
Update version and error handler for authorization header
  • Loading branch information
dmtzs committed Feb 11, 2023
2 parents 88d586f + 9367f53 commit e4abf1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = Flask-authgen-jwt
version = 4.0.0
version = 4.1.0
author = Diego Martinez
license = MIT
author_email = [email protected]
Expand Down
2 changes: 2 additions & 0 deletions src/flask_authgen_jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ def __decode_jwt(self) -> Optional[dict]:
:return: the decoded token or None if an error occurred
"""
auth_header = request.headers.get("Authorization")
if auth_header is None:
self.gen_abort_error("Authorization header is missing", 400)
auth_header = auth_header.split(" ")
token = auth_header[1]
del auth_header
Expand Down

0 comments on commit e4abf1e

Please sign in to comment.