- Sort Score
- Result 10 results
- Languages All
Results 621 - 630 of 871 for _blank (0.06 sec)
-
docs/zh/docs/advanced/security/oauth2-scopes.md
是否使用冒号 `:` 等符号,或是不是 URL 并不重要。 这些细节只是特定的实现方式。 对 OAuth2 来说,它们都只是字符串而已。 /// ## 全局纵览 首先,快速浏览一下以下代码与**用户指南**中 [OAuth2 实现密码哈希与 Bearer JWT 令牌验证](../../tutorial/security/oauth2-jwt.md){.internal-link target=_blank}一章中代码的区别。以下代码使用 OAuth2 作用域: ```Python hl_lines="2 4 8 12 46 64 105 107-115 121-124 128-134 139 153" {!../../docs_src/security/tutorial005.py!} ``` 下面,我们逐步说明修改的代码内容。 ## OAuth2 安全方案
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.8K bytes - Viewed (0) -
docs/zh/docs/tutorial/security/simple-oauth2.md
disabled = user_dict["disabled"], hashed_password = user_dict["hashed_password"], ) ``` /// info | "说明" `user_dict` 的说明,详见[**更多模型**一章](../extra-models.md#user_indict){.internal-link target=_blank}。 /// ## 返回 Token `token` 端点的响应必须是 JSON 对象。 响应返回的内容应该包含 `token_type`。本例中用的是**Bearer**Token,因此, Token 类型应为**`bearer`**。 返回内容还应包含 `access_token` 字段,它是包含权限 Token 的字符串。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.8K bytes - Viewed (0) -
docs/zh/docs/advanced/security/http-basic-auth.md
<img src="/img/tutorial/security/image12.png"> ## 检查用户名 以下是更完整的示例。 使用依赖项检查用户名与密码是否正确。 为此要使用 Python 标准模块 <a href="https://docs.python.org/3/library/secrets.html" class="external-link" target="_blank">`secrets`</a> 检查用户名与密码。 `secrets.compare_digest()` 需要仅包含 ASCII 字符(英语字符)的 `bytes` 或 `str`,这意味着它不适用于像`á`一样的字符,如 `Sebastián`。 为了解决这个问题,我们首先将 `username` 和 `password` 转换为使用 UTF-8 编码的 `bytes` 。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.2K bytes - Viewed (0) -
docs/zh/docs/advanced/generate-clients.md
## OpenAPI 客户端生成 有许多工具可以从**OpenAPI**生成客户端。 一个常见的工具是 <a href="https://openapi-generator.tech/" class="external-link" target="_blank">OpenAPI Generator</a>。 如果您正在开发**前端**,一个非常有趣的替代方案是 <a href="https://github.com/hey-api/openapi-ts" class="external-link" target="_blank">openapi-ts</a>。 ## 生成一个 TypeScript 前端客户端 让我们从一个简单的 FastAPI 应用开始: //// tab | Python 3.9+ ```Python hl_lines="7-9 12-13 16-17 21"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9K bytes - Viewed (0) -
docs/zh/docs/tutorial/query-params-str-validations.md
{!../../docs_src/query_params_str_validations/tutorial006b.py!} ``` /// info 如果你之前没见过 `...` 这种用法:它是一个特殊的单独值,它是 <a href="https://docs.python.org/3/library/constants.html#Ellipsis" class="external-link" target="_blank">Python 的一部分并且被称为「省略号」</a>。 Pydantic 和 FastAPI 使用它来显式的声明需要一个值。 /// 这将使 **FastAPI** 知道此查询参数是必需的。 ### 使用`None`声明必需参数 你可以声明一个参数可以接收`None`值,但它仍然是必需的。这将强制客户端发送一个值,即使该值是`None`。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.2K bytes - Viewed (0) -
docs/pt/docs/tutorial/security/simple-oauth2.md
) ``` /// info | Informação Para uma explicação mais completa de `**user_dict`, verifique [a documentação para **Extra Models**](../extra-models.md#about-user_indict){.internal-link target=_blank}. /// ## Retorne o token A resposta do endpoint `token` deve ser um objeto JSON. Deve ter um `token_type`. No nosso caso, como estamos usando tokens "Bearer", o tipo de token deve ser "`bearer`".
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Oct 31 12:17:45 UTC 2024 - 13.3K bytes - Viewed (0) -
docs/em/docs/tutorial/query-params-str-validations.md
{!../../docs_src/query_params_str_validations/tutorial006b.py!} ``` /// info 🚥 👆 🚫 👀 👈 `...` ⏭: ⚫️ 🎁 👁 💲, ⚫️ <a href="https://docs.python.org/3/library/constants.html#Ellipsis" class="external-link" target="_blank">🍕 🐍 & 🤙 "❕"</a>. ⚫️ ⚙️ Pydantic & FastAPI 🎯 📣 👈 💲 ✔. /// 👉 🔜 ➡️ **FastAPI** 💭 👈 👉 🔢 ✔. ### ✔ ⏮️ `None`
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/dependencies/index.md
Se você utiliza uma versão anterior, ocorrerão erros ao tentar utilizar `Annotated`. Certifique-se de [Atualizar a versão do FastAPI](../../deployment/versions.md#atualizando-as-versoes-do-fastapi){.internal-link target=_blank} para pelo menos 0.95.1 antes de usar `Annotated`. /// ### Importando `Depends` //// tab | Python 3.10+ ```Python hl_lines="3" {!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 12.6K bytes - Viewed (0) -
docs/em/docs/tutorial/path-operation-configuration.md
👆 💪 ✍ <a href="https://en.wikipedia.org/wiki/Markdown" class="external-link" target="_blank">✍</a> #️⃣ , ⚫️ 🔜 🔬 & 🖥 ☑ (✊ 🔘 🏧 #️⃣ 📐). //// tab | 🐍 3️⃣.6️⃣ & 🔛 ```Python hl_lines="19-27" {!> ../../docs_src/path_operation_configuration/tutorial004.py!} ``` ////
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.2K bytes - Viewed (0) -
docs/em/docs/tutorial/query-params.md
``` //// 👉 💼, 📤 3️⃣ 🔢 🔢: * `needy`, ✔ `str`. * `skip`, `int` ⏮️ 🔢 💲 `0`. * `limit`, 📦 `int`. /// tip 👆 💪 ⚙️ `Enum`Ⓜ 🎏 🌌 ⏮️ [➡ 🔢](path-params.md#_7){.internal-link target=_blank}.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.4K bytes - Viewed (0)