mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-12 21:48:35 +03:00
better logs
This commit is contained in:
@@ -20,6 +20,7 @@ async def get_bearer_auth(credentials: HTTPAuthorizationCredentials = Depends(be
|
|||||||
# validates the Bearer token in the case that it requires it
|
# validates the Bearer token in the case that it requires it
|
||||||
access_token = credentials.credentials
|
access_token = credentials.credentials
|
||||||
valid_user, info = authenticate_user(access_token)
|
valid_user, info = authenticate_user(access_token)
|
||||||
|
logger.debug(f"TOKEN authentication: {valid_user=} {info=}")
|
||||||
if valid_user: return info
|
if valid_user: return info
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||||
|
|||||||
Reference in New Issue
Block a user