revert Update backend/beyond_api/security.py
This commit is contained in:
2026-01-28 15:47:51 +00:00
parent 4b0f93540f
commit d3af112bdf

View File

@@ -35,11 +35,9 @@ def get_current_user(credentials: HTTPBasicCredentials | None = Depends(security
# Guarrada maxima, yo no he sido # Guarrada maxima, yo no he sido
correct_username = secrets.compare_digest(credentials.username, INT_USER) correct_username = secrets.compare_digest(credentials.username, INT_USER)
correct_password = secrets.compare_digest(credentials.password, INT_PASS) correct_password = secrets.compare_digest(credentials.password, INT_PASS)
# si no volvemos a hacer la comparación no va raise HTTPException(
if not (correct_username and correct_password): status_code=status.HTTP_401_UNAUTHORIZED,
raise HTTPException( detail="Credenciales incorrectas",
status_code=status.HTTP_401_UNAUTHORIZED, )
detail="Credenciales incorrectas",
)
return credentials.username return credentials.username