Skip to content

Commit

Permalink
Push version and fix flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dolamroth committed Sep 23, 2024
1 parent bf9d81d commit 1695a56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "starlette_web"
version = "0.1.9"
version = "0.1.10"
description = "Asynchronous web framework, based on Starlette and inspired by Django"
readme = "README.md"
authors = [
Expand Down
9 changes: 6 additions & 3 deletions starlette_web/common/authorization/jwt_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ async def authenticate(self, **kwargs) -> BaseUserMixin:
return user

def _get_auth_header(self):
# Note: JavaScript browser API does not allow sending headers when initializing WS connection.
# Note: JavaScript browser API does not allow sending headers
# when initializing WS connection.
# You may want to use Sec-WebSocket-Protocol header instead.
auth_header = self.request.headers.get("Authorization") \
or self.request.headers.get("authorization")
auth_header = (
self.request.headers.get("Authorization")
or self.request.headers.get("authorization")
)
if not auth_header:
raise AuthenticationRequiredError("Invalid token header. No credentials provided.")

Expand Down

0 comments on commit 1695a56

Please sign in to comment.