Skip to content

Commit

Permalink
adding the option to set Cookie as a header name (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsakmak authored Apr 13, 2024
1 parent 3f5d0e6 commit 76f629c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flask_cognito.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ def get_token(self):
auth_header_prefix = _cog.jwt_header_prefix

# get token value from header
auth_header_value = request.headers.get(auth_header_name)
if auth_header_name == 'Cookie':
return request.cookies.get('session_token')
else:
auth_header_value = request.headers.get(auth_header_name)

if not auth_header_value:
# no auth header found
Expand Down

0 comments on commit 76f629c

Please sign in to comment.