Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 85 for accept (0.15 sec)

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

    Create a variable for the expiration of the token.
    
    Define a Pydantic Model that will be used in the token endpoint for the response.
    
    Create a utility function to generate a new access token.
    
    === "Python 3.10+"
    
        ```Python hl_lines="6  12-14  28-30  78-86"
        {!> ../../../docs_src/security/tutorial004_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
    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)
  2. docs/zh/docs/tutorial/security/simple-oauth2.md

    返回内容还应包含 `access_token` 字段,它是包含权限 Token 的字符串。
    
    本例只是简单的演示,返回的 Token 就是 `username`,但这种方式极不安全。
    
    !!! tip "提示"
    
        下一章介绍使用哈希密码和 <abbr title="JSON Web Tokens">JWT</abbr> Token 的真正安全机制。
    
        但现在,仅关注所需的特定细节。
    
    ```Python hl_lines="85"
    {!../../../docs_src/security/tutorial003.py!}
    ```
    
    !!! tip "提示"
    
        按规范的要求,应像本示例一样,返回带有 `access_token` 和 `token_type` 的 JSON 对象。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  3. docs/en/docs/release-notes.md

        * Read the new docs: [Dependencies with `yield` and `except`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#dependencies-with-yield-and-except).
    
    In short, if you had dependencies that looked like:
    
    ```Python
    def my_dep():
        try:
            yield
        except SomeException:
            pass
    ```
    
    Now you need to make sure you raise again after `except`, just as you would in regular Python:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  4. docs/en/docs/how-to/custom-request-and-route.md

        But this example is still valid and it shows how to interact with the internal components.
    
    We can also use this same approach to access the request body in an exception handler.
    
    All we need to do is handle the request inside a `try`/`except` block:
    
    ```Python hl_lines="13  15"
    {!../../../docs_src/custom_request_and_route/tutorial002.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  5. docs/em/docs/tutorial/security/simple-oauth2.md

    ## 📨 🤝
    
    📨 `token` 🔗 🔜 🎻 🎚.
    
    ⚫️ 🔜 ✔️ `token_type`. 👆 💼, 👥 ⚙️ "📨" 🤝, 🤝 🆎 🔜 "`bearer`".
    
    &amp; ⚫️ 🔜 ✔️ `access_token`, ⏮️ 🎻 ⚗ 👆 🔐 🤝.
    
    👉 🙅 🖼, 👥 🔜 🍕 😟 &amp; 📨 🎏 `username` 🤝.
    
    !!! tip
        ⏭ 📃, 👆 🔜 👀 🎰 🔐 🛠️, ⏮️ 🔐 #️⃣ &amp; <abbr title="JSON Web Tokens">🥙</abbr> 🤝.
    
        ✋️ 🔜, ➡️ 🎯 🔛 🎯 ℹ 👥 💪.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/background-tasks.md

    * Daten verarbeiten:
        * Angenommen, Sie erhalten eine Datei, die einen langsamen Prozess durchlaufen muss. Sie können als Response „Accepted“ (HTTP 202) zurückgeben und die Datei im Hintergrund verarbeiten.
    
    ## `BackgroundTasks` verwenden
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 12 14:15:29 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  7. docs/en/docs/deployment/https.md

    As only one process can be listening on this port, the process that would do it would be the **TLS Termination Proxy**.
    
    The TLS Termination Proxy would have access to one or more **TLS certificates** (HTTPS certificates).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 12K bytes
    - Viewed (0)
  8. docs/en/docs/deployment/concepts.md

    ## Running on Startup
    
    In most cases, when you create a web API, you want it to be **always running**, uninterrupted, so that your clients can always access it. This is of course, unless you have a specific reason why you want it to run only in certain situations, but most of the time you want it constantly running and **available**.
    
    ### In a Remote Server
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 18K bytes
    - Viewed (0)
  9. docs/ja/docs/tutorial/security/oauth2-jwt.md

    09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7
    ```
    
    </div>
    
    そして、出力された文字列を変数`SECRET_KEY`にコピーします。(例に記載している秘密鍵は実際に使用しないでください)
    
    JWTトークンの署名に使用するアルゴリズム`"HS256"`を指定した変数`ALGORITHM`を作成します。
    
    トークンの有効期限を指定した変数`ACCESS_TOKEN_EXPIRE_MINUTES`を作成します。
    
    レスポンスのトークンエンドポイントで使用するPydanticモデルを定義します。
    
    新しいアクセストークンを生成するユーティリティ関数を作成します。
    
    ```Python hl_lines="6  12-14  28-30  78-86"
    {!../../../docs_src/security/tutorial004.py!}
    ```
    
    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)
  10. docs/en/docs/tutorial/query-params-str-validations.md

        It is used by Pydantic and FastAPI to explicitly declare that a value is required.
    
    This will let **FastAPI** know that this parameter is required.
    
    ### Required with `None`
    
    You can declare that a parameter can accept `None`, but that it's still required. This would force clients to send a value, even if the value is `None`.
    
    To do that, you can declare that `None` is a valid type but still use `...` as the default:
    
    === "Python 3.10+"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 25.7K bytes
    - Viewed (0)
Back to top