- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for 111 (0.29 sec)
-
docs/zh/docs/advanced/security/http-basic-auth.md
## 检查用户名 以下是更完整的示例。 使用依赖项检查用户名与密码是否正确。 为此要使用 Python 标准模块 <a href="https://docs.python.org/3/library/secrets.html" class="external-link" target="_blank">`secrets`</a> 检查用户名与密码: ```Python hl_lines="1 11-13" {!../../../docs_src/security/tutorial007.py!} ``` 这段代码确保 `credentials.username` 是 `"stanleyjobson"`,且 `credentials.password` 是`"swordfish"`。与以下代码类似: ```Python
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 22:43:48 GMT 2024 - 3.9K bytes - Viewed (0) -
docs/de/docs/advanced/security/http-basic-auth.md
{!> ../../../docs_src/security/tutorial007_an.py!} ``` === "Python 3.8+ nicht annotiert" !!! tip "Tipp" Bevorzugen Sie die `Annotated`-Version, falls möglich. ```Python hl_lines="1 11-21" {!> ../../../docs_src/security/tutorial007.py!} ``` Dies wäre das gleiche wie: ```Python if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:28:08 GMT 2024 - 6.9K bytes - Viewed (0) -
docs/em/docs/advanced/security/http-basic-auth.md
🍵 👈, 👥 🥇 🗜 `username` & `password` `bytes` 🔢 👫 ⏮️ 🔠-8️⃣. ⤴️ 👥 💪 ⚙️ `secrets.compare_digest()` 🚚 👈 `credentials.username` `"stanleyjobson"`, & 👈 `credentials.password` `"swordfish"`. ```Python hl_lines="1 11-21" {!../../../docs_src/security/tutorial007.py!} ``` 👉 🔜 🎏: ```Python if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"): # Return some error ... ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 4.1K bytes - Viewed (0) -
docs/en/docs/advanced/security/http-basic-auth.md
{!> ../../../docs_src/security/tutorial007_an.py!} ``` === "Python 3.8+ non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python hl_lines="1 11-21" {!> ../../../docs_src/security/tutorial007.py!} ``` This would be similar to: ```Python if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 14:33:05 GMT 2024 - 5.9K bytes - Viewed (0)