- Sort Score
- Num 10 results
- Language All
Results 121 - 130 of 677 for user_age (0.24 seconds)
-
tests/test_security_api_key_header_description.py
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") def read_current_user(current_user: User = Depends(get_current_user)): return current_user
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2.1K bytes - Click Count (0) -
tests/test_tutorial/test_generate_clients/test_tutorial004.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 8.3K bytes - Click Count (0) -
docs/pt/docs/tutorial/security/simple-oauth2.md
## Obtenha o `username` e a `password` { #get-the-username-and-password } É utilizado o utils de segurança da **FastAPI** para obter o `username` e a `password`. OAuth2 especifica que ao usar o "password flow" (fluxo de senha), que estamos usando, o cliente/usuário deve enviar os campos `username` e `password` como dados do formulário.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Nov 12 16:23:57 GMT 2025 - 10.3K bytes - Click Count (0) -
src/main/java/jcifs/audit/SecurityAuditLogger.java
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 26.6K bytes - Click Count (0) -
docs_src/header_params/tutorial001_an_py310.py
from typing import Annotated from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(user_agent: Annotated[str | None, Header()] = None):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 217 bytes - Click Count (0) -
src/main/java/org/codelibs/fess/app/web/admin/dataconfig/AdminDataconfigAction.java
/** * Get a data config entity from a form. * @param form The create form. * @param username The username. * @param currentTime The current time. * @return An optional entity of a data config. */ public static OptionalEntity<DataConfig> getEntity(final CreateForm form, final String username, final long currentTime) { switch (form.crudMode) { case CrudMode.CREATE:Created: Sat Dec 20 09:19:18 GMT 2025 - Last Modified: Thu Nov 20 13:56:35 GMT 2025 - 19.2K bytes - Click Count (0) -
docs_src/header_params/tutorial001_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(user_agent: Annotated[Union[str, None], Header()] = None):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 230 bytes - Click Count (0) -
tests/test_security_api_key_query_description.py
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") def read_current_user(current_user: User = Depends(get_current_user)): return current_user
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2K bytes - Click Count (0) -
docs/ru/docs/advanced/security/http-basic-auth.md
Чтобы это обработать, сначала преобразуем `username` и `password` в `bytes`, закодировав их в UTF-8. Затем можно использовать `secrets.compare_digest()`, чтобы убедиться, что `credentials.username` равен `"stanleyjobson"`, а `credentials.password` — `"swordfish"`. {* ../../docs_src/security/tutorial007_an_py39.py hl[1,12:24] *} Это было бы похоже на: ```Python
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 30 11:37:11 GMT 2025 - 7.4K bytes - Click Count (0) -
docs/zh/docs/tutorial/security/simple-oauth2.md
本章添加上一章示例中欠缺的部分,实现完整的安全流。 ## 获取 `username` 和 `password` 首先,使用 **FastAPI** 安全工具获取 `username` 和 `password`。 OAuth2 规范要求使用**密码流**时,客户端或用户必须以表单数据形式发送 `username` 和 `password` 字段。 并且,这两个字段必须命名为 `username` 和 `password` ,不能使用 `user-name` 或 `email` 等其它名称。 不过也不用担心,前端仍可以显示终端用户所需的名称。 数据库模型也可以使用所需的名称。 但对于登录*路径操作*,则要使用兼容规范的 `username` 和 `password`,(例如,实现与 API 文档集成)。 该规范要求必须以表单数据形式发送 `username` 和 `password`,因此,不能使用 JSON 对象。
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 18 02:25:44 GMT 2024 - 8.6K bytes - Click Count (0)