setup Auth component

This commit is contained in:
Thomas Peetz
2025-11-12 21:06:28 +01:00
parent 66a93b2b97
commit 447030533f
6 changed files with 145 additions and 25 deletions
+1 -3
View File
@@ -45,9 +45,7 @@ class OAuth2PasswordBearerWithCookie(OAuth2):
super().__init__(flows=flows, scheme_name=scheme_name, auto_error=auto_error)
async def __call__(self, request: Request) -> Optional[str]:
authorization: str = request.cookies.get(
"access_token"
) # changed to accept access token from httpOnly Cookie
authorization: str = request.cookies.get("access_token") # changed to accept access token from httpOnly Cookie
scheme, param = get_authorization_scheme_param(authorization)
if not authorization or scheme.lower() != "bearer":