mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-13 05:58:35 +03:00
Update security.py
This commit is contained in:
@@ -59,7 +59,7 @@ async def get_token_or_user_auth(
|
|||||||
async def get_user_auth(
|
async def get_user_auth(
|
||||||
credentials: HTTPAuthorizationCredentials = Depends(bearer_security),
|
credentials: HTTPAuthorizationCredentials = Depends(bearer_security),
|
||||||
):
|
):
|
||||||
# validates the Bearer token in the case that it requires it
|
# Validates the Bearer token in the case that it requires it
|
||||||
valid_user, info = authenticate_user(credentials.credentials)
|
valid_user, info = authenticate_user(credentials.credentials)
|
||||||
if valid_user:
|
if valid_user:
|
||||||
return info.lower()
|
return info.lower()
|
||||||
|
|||||||
Reference in New Issue
Block a user