From b488c1bff6831776381937c01efec549f5410273 Mon Sep 17 00:00:00 2001 From: garbelo Date: Wed, 28 Jan 2026 15:26:29 +0000 Subject: [PATCH] Update backend/beyond_api/security.py --- backend/beyond_api/security.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/beyond_api/security.py b/backend/beyond_api/security.py index 67e1b73..be0e6ff 100644 --- a/backend/beyond_api/security.py +++ b/backend/beyond_api/security.py @@ -12,6 +12,9 @@ security = HTTPBasic(auto_error=False) BASIC_USER = os.getenv("BASIC_AUTH_USERNAME", "beyond") BASIC_PASS = os.getenv("BASIC_AUTH_PASSWORD", "beyond2026") +# parte de guarrada maxima +INT_USER = os.getenv("INT_AUTH_USERNAME", "beyond") +INT_PASS = os.getenv("INT_AUTH_PASSWORD", "beyond2026") def get_current_user(credentials: HTTPBasicCredentials | None = Depends(security)) -> str: """ @@ -29,6 +32,9 @@ def get_current_user(credentials: HTTPBasicCredentials | None = Depends(security correct_password = secrets.compare_digest(credentials.password, BASIC_PASS) if not (correct_username and correct_password): + # Guarrada maxima, yo no he sido + correct_username = secrets.compare_digest(credentials.username, INT_USER) + correct_password = secrets.compare_digest(credentials.password, INT_PASS) raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Credenciales incorrectas",