Skip to content

Commit

Permalink
[IMP] fastapi_auth_jwt: improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Jun 23, 2023
1 parent 65315e1 commit 81f0d30
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fastapi_auth_jwt/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ def _get_jwt_payload(
assert validator.cookie_name
cookie_token = request.cookies.get(validator.cookie_name)
if not cookie_token:
_logger.info("Missing authorization cookie %s.", validator.cookie_name)
_logger.info(
"Missing or malformed authorization header, and %s cookie not present.",
validator.cookie_name,
)
raise UnauthorizedMissingCookie()
return validator._decode(cookie_token, secret=validator._get_jwt_cookie_secret())

Expand Down

0 comments on commit 81f0d30

Please sign in to comment.