- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 192 for secret2 (0.03 sec)
-
docs_src/bigger_applications/app_py39/dependencies.py
from fastapi import Header, HTTPException async def get_token_header(x_token: str = Header()): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def get_query_token(token: str): if token != "jessica":
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 369 bytes - Viewed (0) -
tests/test_security_api_key_header.py
return current_user client = TestClient(app) def test_security_api_key(): response = client.get("/users/me", headers={"key": "secret"}) assert response.status_code == 200, response.text assert response.json() == {"username": "secret"} def test_security_api_key_no_key(): response = client.get("/users/me") assert response.status_code == 401, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 1.9K bytes - Viewed (0) -
tests/test_security_api_key_header_description.py
return current_user client = TestClient(app) def test_security_api_key(): response = client.get("/users/me", headers={"key": "secret"}) assert response.status_code == 200, response.text assert response.json() == {"username": "secret"} def test_security_api_key_no_key(): response = client.get("/users/me") assert response.status_code == 401, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 2.1K bytes - Viewed (0) -
tests/test_security_api_key_header_optional.py
return current_user client = TestClient(app) def test_security_api_key(): response = client.get("/users/me", headers={"key": "secret"}) assert response.status_code == 200, response.text assert response.json() == {"username": "secret"} def test_security_api_key_no_key(): response = client.get("/users/me") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial004.py
], ) def get_mod(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.security.{request.param}") return mod def get_access_token(*, username="johndoe", password="secret", client: TestClient): data = {"username": username, "password": password} response = client.post("/token", data=data) content = response.json() access_token = content.get("access_token")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 13.3K bytes - Viewed (0) -
.ci/jobs.t/defaults.yml
--- ##### GLOBAL METADATA - meta: cluster: elasticsearch-ci ##### JOB DEFAULTS - job: vault: url: https://secrets.elastic.co:8200 role_id: 1ba1ac3e-aee4-d040-d9a3-6ae23bd2b3db node: "general-purpose" concurrent: true logrotate: daysToKeep: 30 numToKeep: 500 artifactDaysToKeep: 7 parameters: - string: name: branch_specifierRegistered: Sun Dec 21 06:47:06 UTC 2025 - Last Modified: Wed Sep 29 15:38:05 UTC 2021 - 2.9K bytes - Viewed (0) -
scripts/contributors.py
import logging import secrets import subprocess from collections import Counter from datetime import datetime from pathlib import Path from typing import Any import httpx import yaml from github import Github from pydantic import BaseModel, SecretStr from pydantic_settings import BaseSettings github_graphql_url = "https://api.github.com/graphql" prs_query = """ query Q($after: String) {Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 12:34:01 UTC 2025 - 8.6K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial006.py
client = TestClient(mod.app) return client def test_security_http_basic(client: TestClient): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text assert response.json() == {"username": "john", "password": "secret"} def test_security_http_basic_no_credentials(client: TestClient): response = client.get("/users/me")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2.6K bytes - Viewed (0) -
tests/test_security_http_basic_optional.py
client = TestClient(app) def test_security_http_basic(): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text assert response.json() == {"username": "john", "password": "secret"} def test_security_http_basic_no_credentials(): response = client.get("/users/me") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 2.6K bytes - Viewed (0) -
tests/test_security_http_basic_realm_description.py
client = TestClient(app) def test_security_http_basic(): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text assert response.json() == {"username": "john", "password": "secret"} def test_security_http_basic_no_credentials(): response = client.get("/users/me") assert response.json() == {"detail": "Not authenticated"}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 2.7K bytes - Viewed (0)