From 5f437d341a60363ef60f9dfa0ae349523c8ac08b Mon Sep 17 00:00:00 2001 From: Cannon Lock Date: Fri, 18 Oct 2024 11:13:05 -0500 Subject: [PATCH] Add Logging --- macrostrat_db_insertion/security/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macrostrat_db_insertion/security/main.py b/macrostrat_db_insertion/security/main.py index fe389e0..8311c1b 100644 --- a/macrostrat_db_insertion/security/main.py +++ b/macrostrat_db_insertion/security/main.py @@ -36,6 +36,9 @@ class OAuth2AuthorizationCodeBearerWithCookie(OAuth2AuthorizationCodeBearer): async def __call__(self, request: Request) -> Optional[str]: authorization = request.cookies.get("Authorization") # authorization = request.headers.get("Authorization") scheme, param = get_authorization_scheme_param(authorization) + + logging.debug(f"Authorization: {authorization}") + logging.debug(f"Cookies: {request.cookies}") if not authorization or scheme.lower() != "bearer": if self.auto_error: raise HTTPException(