Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 13 of 13 for timedelta (0.17 sec)

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

    解码并校验接收到的令牌,然后,返回当前用户。
    
    如果令牌无效,则直接返回 HTTP 错误。
    
    ```Python hl_lines="89-106"
    {!../../../docs_src/security/tutorial004.py!}
    ```
    
    ## 更新 `/token` *路径操作*
    
    用令牌过期时间创建 `timedelta` 对象。
    
    创建并返回真正的 JWT 访问令牌。
    
    ```Python hl_lines="115-130"
    {!../../../docs_src/security/tutorial004.py!}
    ```
    
    ### JWT `sub` 的技术细节
    
    JWT 规范还包括 `sub` 键,值是令牌的主题。
    
    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)
  2. docs/en/docs/tutorial/security/oauth2-jwt.md

            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="89-106"
        {!> ../../../docs_src/security/tutorial004.py!}
        ```
    
    ## Update the `/token` *path operation*
    
    Create a `timedelta` with the expiration time of the token.
    
    Create a real JWT access token and return it.
    
    === "Python 3.10+"
    
        ```Python hl_lines="117-132"
        {!> ../../../docs_src/security/tutorial004_an_py310.py!}
    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)
  3. docs/ja/docs/tutorial/security/oauth2-jwt.md

    受け取ったトークンを復号して検証し、現在のユーザーを返します。
    
    トークンが無効な場合は、すぐにHTTPエラーを返します。
    
    ```Python hl_lines="89-106"
    {!../../../docs_src/security/tutorial004.py!}
    ```
    
    ## `/token` パスオペレーションの更新
    
    トークンの有効期限を表す`timedelta`を作成します。
    
    JWTアクセストークンを作成し、それを返します。
    
    ```Python hl_lines="115-130"
    {!../../../docs_src/security/tutorial004.py!}
    ```
    
    ### JWTの"subject" `sub` についての技術的な詳細
    
    JWTの仕様では、トークンのsubjectを表すキー`sub`があるとされています。
    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)
Back to top