Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for dependsOn (0.14 sec)

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

        对 OAuth2 来说,都只是字符串而已。
    
    ## 获取 `username` 和 `password` 的代码
    
    接下来,使用 **FastAPI** 工具获取用户名与密码。
    
    ### `OAuth2PasswordRequestForm`
    
    首先,导入 `OAuth2PasswordRequestForm`,然后,在 `/token` *路径操作* 中,用 `Depends` 把该类作为依赖项。
    
    ```Python hl_lines="4  76"
    {!../../../docs_src/security/tutorial003.py!}
    ```
    
    `OAuth2PasswordRequestForm` 是用以下几项内容声明表单请求体的类依赖项:
    
    * `username`
    * `password`
    * 可选的 `scope` 字段,由多个空格分隔的字符串组成的长字符串
    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)
  2. docs/em/docs/tutorial/security/simple-oauth2.md

        👈 ℹ 🛠️ 🎯.
    
        Oauth2️⃣ 👫 🎻.
    
    ## 📟 🤚 `username` & `password`
    
    🔜 ➡️ ⚙️ 🚙 🚚 **FastAPI** 🍵 👉.
    
    ### `OAuth2PasswordRequestForm`
    
    🥇, 🗄 `OAuth2PasswordRequestForm`, & ⚙️ ⚫️ 🔗 ⏮️ `Depends` *➡ 🛠️* `/token`:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="4  76"
        {!> ../../../docs_src/security/tutorial003.py!}
        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    
        ```Python hl_lines="2  74"
    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)
  3. docs/ko/docs/tutorial/security/simple-oauth2.md

        OAuth2의 경우 문자열일 뿐입니다.
    
    ## `username`과 `password`를 가져오는 코드
    
    이제 **FastAPI**에서 제공하는 유틸리티를 사용하여 이를 처리해 보겠습니다.
    
    ### `OAuth2PasswordRequestForm`
    
    먼저 `OAuth2PasswordRequestForm`을 가져와 `/token`에 대한 *경로 작동*에서 `Depends`의 의존성으로 사용합니다.
    
    === "파이썬 3.7 이상"
    
        ```Python hl_lines="4  76"
        {!> ../../../docs_src/security/tutorial003.py!}
        ```
    
    === "파이썬 3.10 이상"
    
        ```Python hl_lines="2  74"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 22:37:23 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/security/simple-oauth2.md

    Lassen Sie uns nun die von **FastAPI** bereitgestellten Werkzeuge verwenden, um das zu erledigen.
    
    ### `OAuth2PasswordRequestForm`
    
    Importieren Sie zunächst `OAuth2PasswordRequestForm` und verwenden Sie es als Abhängigkeit mit `Depends` in der *Pfadoperation* für `/token`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="4  78"
        {!> ../../../docs_src/security/tutorial003_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:08:44 GMT 2024
    - 14.3K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/security/simple-oauth2.md

    ## Code to get the `username` and `password`
    
    Now let's use the utilities provided by **FastAPI** to handle this.
    
    ### `OAuth2PasswordRequestForm`
    
    First, import `OAuth2PasswordRequestForm`, and use it as a dependency with `Depends` in the *path operation* for `/token`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="4  78"
        {!> ../../../docs_src/security/tutorial003_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
    - 12.5K bytes
    - Viewed (0)
Back to top