Fixes: 1) Correct HTTP header key to use "HTTP_X_EVIBES_AUTH" for token-based authentication.
This commit is contained in:
parent
9632915593
commit
6d8d4def5b
1 changed files with 1 additions and 1 deletions
|
|
@ -36,7 +36,7 @@ class JWTAuthMiddleware(BaseMiddleware):
|
||||||
|
|
||||||
class _Req:
|
class _Req:
|
||||||
def __init__(self, token_str: str):
|
def __init__(self, token_str: str):
|
||||||
self.META = {"HTTP_AUTHORIZATION": f"Bearer {token_str}"}
|
self.META = {"HTTP_X_EVIBES_AUTH": f"Bearer {token_str}"}
|
||||||
|
|
||||||
user, _ = jwt_auth.authenticate(_Req(token)) # type: ignore[arg-type]
|
user, _ = jwt_auth.authenticate(_Req(token)) # type: ignore[arg-type]
|
||||||
scope["user"] = user
|
scope["user"] = user
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue