- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for swordfish (0.04 sec)
-
tests/test_tutorial/test_security/test_tutorial007.py
mod = importlib.import_module(f"docs_src.security.{request.param}") return TestClient(mod.app) def test_security_http_basic(client: TestClient): response = client.get("/users/me", auth=("stanleyjobson", "swordfish")) assert response.status_code == 200, response.text assert response.json() == {"username": "stanleyjobson"} def test_security_http_basic_no_credentials(client: TestClient):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 3.2K bytes - Viewed (0) -
docs/es/docs/advanced/security/http-basic-auth.md
{* ../../docs_src/security/tutorial007_an_py39.py hl[1,12:24] *} Esto sería similar a: ```Python if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"): # Devuelve algún error ... ```Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 5.4K bytes - Viewed (0) -
docs/pt/docs/advanced/security/http-basic-auth.md
{* ../../docs_src/security/tutorial007_an_py39.py hl[1,12:24] *} Isso seria parecido com: ```Python if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"): # Return some error ... ```Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Nov 12 16:23:57 UTC 2025 - 5.3K bytes - Viewed (0) -
docs_src/security/tutorial007_py39.py
is_correct_username = secrets.compare_digest( current_username_bytes, correct_username_bytes ) current_password_bytes = credentials.password.encode("utf8") correct_password_bytes = b"swordfish" is_correct_password = secrets.compare_digest( current_password_bytes, correct_password_bytes ) if not (is_correct_username and is_correct_password): raise HTTPException(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.1K bytes - Viewed (0)