- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for sub (0.11 sec)
-
docs/zh/docs/tutorial/security/oauth2-jwt.md
同理,JWT 可以用于更复杂的场景。 在这些情况下,多个实体的 ID 可能是相同的,以 ID `foo` 为例,用户的 ID 是 `foo`,车的 ID 是 `foo`,博客的 ID 也是 `foo`。 为了避免 ID 冲突,在给用户创建 JWT 令牌时,可以为 `sub` 键的值加上前缀,例如 `username:`。因此,在本例中,`sub` 的值可以是:`username:johndoe`。 注意,划重点,`sub` 键在整个应用中应该只有一个唯一的标识符,而且应该是字符串。 ## 检查 运行服务器并访问文档: <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>。 可以看到如下用户界面:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 21:21:35 GMT 2024 - 9.2K bytes - Viewed (0) -
docs/de/docs/tutorial/security/oauth2-jwt.md
Deshalb, um ID-Kollisionen zu vermeiden, könnten Sie beim Erstellen des JWT-Tokens für den Benutzer, dem Wert des `sub`-Schlüssels ein Präfix, z. B. `username:` voranstellen. In diesem Beispiel hätte der Wert von `sub` also auch `username:johndoe` sein können. Der wesentliche Punkt ist, dass der `sub`-Schlüssel in der gesamten Anwendung eine eindeutige Kennung haben sollte, und er sollte ein String sein. ## Es testen
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:27:06 GMT 2024 - 15.1K bytes - Viewed (0) -
docs/em/docs/tutorial/security/oauth2-jwt.md
⚙️ 👫 💭, 🥙 💪 ⚙️ 🌌 🌖 🤓 😐. 📚 💼, 📚 👈 👨💼 💪 ✔️ 🎏 🆔, ➡️ 💬 `foo` (👩💻 `foo`, 🚘 `foo`, & 📰 🏤 `foo`). , ❎ 🆔 💥, 🕐❔ 🏗 🥙 🤝 👩💻, 👆 💪 🔡 💲 `sub` 🔑, ✅ ⏮️ `username:`. , 👉 🖼, 💲 `sub` 💪 ✔️: `username:johndoe`. ⚠ 👜 ✔️ 🤯 👈 `sub` 🔑 🔜 ✔️ 😍 🆔 🤭 🎂 🈸, & ⚫️ 🔜 🎻. ## ✅ ⚫️ 🏃 💽 & 🚶 🩺: <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 21:21:35 GMT 2024 - 9.5K bytes - Viewed (0) -
docs/en/docs/tutorial/security/oauth2-jwt.md
So, to avoid ID collisions, when creating the JWT token for the user, you could prefix the value of the `sub` key, e.g. with `username:`. So, in this example, the value of `sub` could have been: `username:johndoe`. The important thing to keep in mind is that the `sub` key should have a unique identifier across the entire application, and it should be a string. ## Check it
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 13K bytes - Viewed (0) -
docs/ja/docs/tutorial/security/oauth2-jwt.md
トークンの有効期限を表す`timedelta`を作成します。 JWTアクセストークンを作成し、それを返します。 ```Python hl_lines="115-130" {!../../../docs_src/security/tutorial004.py!} ``` ### JWTの"subject" `sub` についての技術的な詳細 JWTの仕様では、トークンのsubjectを表すキー`sub`があるとされています。 使用するかどうかは任意ですが、`sub`はユーザーの識別情報を入れるように規定されているので、ここで使用します。 JWTは、ユーザーを識別して、そのユーザーがAPI上で直接操作を実行できるようにする以外にも、他の用途で使用されることがあります。 例えば、「車」や「ブログ記事」を識別することができます。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 21:21:35 GMT 2024 - 14.1K bytes - Viewed (0)