- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for apiKey (0.04 sec)
-
tests/test_security_api_key_header.py
from fastapi.security import APIKeyHeader from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyHeader(name="key") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(api_key)): user = User(username=oauth_header) return user @app.get("/users/me")
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
from fastapi.security import APIKeyHeader from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyHeader(name="key", description="An API Key Header") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(api_key)): user = User(username=oauth_header) return user @app.get("/users/me")
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_query.py
from fastapi.security import APIKeyQuery from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyQuery(name="key") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(api_key)): user = User(username=oauth_header) return user @app.get("/users/me")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 1.9K bytes - Viewed (0) -
fastapi/security/api_key.py
For this, this method sends a custom challenge `APIKey`. """ return HTTPException( status_code=HTTP_401_UNAUTHORIZED, detail="Not authenticated", headers={"WWW-Authenticate": "APIKey"}, ) def check_api_key(self, api_key: Optional[str]) -> Optional[str]: if not api_key: if self.auto_error:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 9.6K bytes - Viewed (1) -
tests/test_security_api_key_query_description.py
from fastapi.security import APIKeyQuery from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyQuery(name="key", description="API Key Query") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(api_key)): user = User(username=oauth_header) return user @app.get("/users/me")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 2K bytes - Viewed (0) -
tests/test_security_api_key_cookie.py
from fastapi.security import APIKeyCookie from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyCookie(name="key") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(api_key)): user = User(username=oauth_header) return user @app.get("/users/me")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 2K bytes - Viewed (0) -
tests/test_security_api_key_cookie_description.py
from fastapi.security import APIKeyCookie from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyCookie(name="key", description="An API Cookie Key") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(api_key)): user = User(username=oauth_header) return user @app.get("/users/me")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 2.1K bytes - Viewed (0) -
fastapi/openapi/models.py
trace: Optional[Operation] = None servers: Optional[list[Server]] = None parameters: Optional[list[Union[Parameter, Reference]]] = None class SecuritySchemeType(Enum): apiKey = "apiKey" http = "http" oauth2 = "oauth2" openIdConnect = "openIdConnect" class SecurityBase(BaseModelWithConfig): type_: SecuritySchemeType = Field(alias="type")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 15.1K bytes - Viewed (0) -
docs/uk/docs/tutorial/security/index.md
Використовуючи їх, Ви можете скористатися всіма цими інструментами, що базуються на стандартах, зокрема інтерактивними системами документації. OpenAPI визначає такі схеми безпеки: * `apiKey`: специфічний для застосунку ключ, який може передаватися через: * Параметр запиту. * Заголовок. * Cookie. * `http`: стандартні методи HTTP-автентифікації, включаючи:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Jun 24 18:57:48 UTC 2025 - 6.8K bytes - Viewed (0) -
docs/pt/docs/tutorial/security/index.md
Por usá-los, você pode ter vantagens de todas essas ferramentas baseadas nos padrões, incluindo os sistemas de documentação interativa. OpenAPI define os seguintes esquemas de segurança: * `apiKey`: uma chave específica de aplicação que pode vir de: * Um parâmetro query. * Um header. * Um cookie. * `http`: padrão HTTP de sistemas autenticação, incluindo:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 10:17:03 UTC 2025 - 4.9K bytes - Viewed (0)