Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for torrent (0.19 sec)

  1. docs/zh/docs/tutorial/security/oauth2-jwt.md

    创建设置令牌过期时间的变量。
    
    定义令牌端点响应的 Pydantic 模型。
    
    创建生成新的访问令牌的工具函数。
    
    ```Python hl_lines="6  12-14  28-30  78-86"
    {!../../../docs_src/security/tutorial004.py!}
    ```
    
    ## 更新依赖项
    
    更新 `get_current_user` 以接收与之前相同的令牌,但这里用的是 JWT 令牌。
    
    解码并校验接收到的令牌,然后,返回当前用户。
    
    如果令牌无效,则直接返回 HTTP 错误。
    
    ```Python hl_lines="89-106"
    {!../../../docs_src/security/tutorial004.py!}
    ```
    
    ## 更新 `/token` *路径操作*
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/security/oauth2-jwt.md

        ```Python hl_lines="6  12-14  28-30  78-86"
        {!> ../../../docs_src/security/tutorial004.py!}
        ```
    
    ## Die Abhängigkeiten aktualisieren
    
    Aktualisieren Sie `get_current_user`, um den gleichen Token wie zuvor zu erhalten, dieses Mal jedoch unter Verwendung von JWT-Tokens.
    
    Dekodieren Sie den empfangenen Token, validieren Sie ihn und geben Sie den aktuellen Benutzer zurück.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:27:06 GMT 2024
    - 15.1K bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/security/oauth2-jwt.md

        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    
        ```Python hl_lines="5  11-13  27-29  77-85"
        {!> ../../../docs_src/security/tutorial004_py310.py!}
        ```
    
    ## ℹ 🔗
    
    ℹ `get_current_user` 📨 🎏 🤝 ⏭, ✋️ 👉 🕰, ⚙️ 🥙 🤝.
    
    🔣 📨 🤝, ✔ ⚫️, & 📨 ⏮️ 👩‍💻.
    
    🚥 🤝 ❌, 📨 🇺🇸🔍 ❌ ▶️️ ↖️.
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="89-106"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/security/oauth2-jwt.md

        {!> ../../../docs_src/security/tutorial004.py!}
        ```
    
    ## Update the dependencies
    
    Update `get_current_user` to receive the same token as before, but this time, using JWT tokens.
    
    Decode the received token, verify it, and return the current user.
    
    If the token is invalid, return an HTTP error right away.
    
    === "Python 3.10+"
    
        ```Python hl_lines="89-106"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/security/oauth2-jwt.md

    レスポンスのトークンエンドポイントで使用するPydanticモデルを定義します。
    
    新しいアクセストークンを生成するユーティリティ関数を作成します。
    
    ```Python hl_lines="6  12-14  28-30  78-86"
    {!../../../docs_src/security/tutorial004.py!}
    ```
    
    ## 依存関係の更新
    
    `get_current_user`を更新して、先ほどと同じトークンを受け取るようにしますが、今回はJWTトークンを使用します。
    
    受け取ったトークンを復号して検証し、現在のユーザーを返します。
    
    トークンが無効な場合は、すぐにHTTPエラーを返します。
    
    ```Python hl_lines="89-106"
    {!../../../docs_src/security/tutorial004.py!}
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 14.1K bytes
    - Viewed (0)
Back to top