From 1a25a806a2f6c4d8c78fb0bce233236edd2dbfd2 Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Thu, 9 Mar 2023 11:41:40 +0000 Subject: [PATCH] log only if not successful --- src/security.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/security.py b/src/security.py index ddd307f..99cbcef 100644 --- a/src/security.py +++ b/src/security.py @@ -20,8 +20,8 @@ async def get_bearer_auth(credentials: HTTPAuthorizationCredentials = Depends(be # validates the Bearer token in the case that it requires it access_token = credentials.credentials valid_user, info = authenticate_user(access_token) - logger.debug(f"TOKEN authentication: {valid_user=} {info=}") if valid_user: return info + logger.debug(f"TOKEN FAILURE: {valid_user=} {info=}") raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail=info,