Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for security (0.32 sec)

  1. docs/en/docs/advanced/security/oauth2-scopes.md

    For this, we import and use `Security` from `fastapi`.
    
    You can use `Security` to declare dependencies (just like `Depends`), but `Security` also receives a parameter `scopes` with a list of scopes (strings).
    
    In this case, we pass a dependency function `get_current_active_user` to `Security` (the same way we would do with `Depends`).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  2. docs/em/docs/advanced/security/oauth2-scopes.md

    ```Python hl_lines="155"
    {!../../../docs_src/security/tutorial005.py!}
    ```
    
    ## 📣 ↔ *➡ 🛠️* & 🔗
    
    🔜 👥 📣 👈 *➡ 🛠️* `/users/me/items/` 🚚 ↔ `items`.
    
    👉, 👥 🗄 & ⚙️ `Security` ⚪️➡️ `fastapi`.
    
    👆 💪 ⚙️ `Security` 📣 🔗 (💖 `Depends`), ✋️ `Security` 📨 🔢 `scopes` ⏮️ 📇 ↔ (🎻).
    
    👉 💼, 👥 🚶‍♀️ 🔗 🔢 `get_current_active_user` `Security` (🎏 🌌 👥 🔜 ⏮️ `Depends`).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 11.1K bytes
    - Viewed (0)
  3. docs/de/docs/advanced/security/oauth2-scopes.md

                        * Einen `security_scopes`-Parameter vom Typ `SecurityScopes`:
                            * Dieser `security_scopes`-Parameter hat ein Attribut `scopes` mit einer `list`e, die alle oben deklarierten Scopes enthält, sprich:
                                * `security_scopes.scopes` enthält `["me", "items"]` für die *Pfadoperation* `read_own_items`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:08 GMT 2024
    - 22.8K bytes
    - Viewed (0)
  4. docs/zh/docs/advanced/security/oauth2-scopes.md

    ```Python hl_lines="153"
    {!../../../docs_src/security/tutorial005.py!}
    ```
    
    ## 在*路径操作*与依赖项中声明作用域
    
    接下来,为*路径操作*  `/users/me/items/` 声明作用域 `items`。
    
    为此,要从 `fastapi` 中导入并使用 `Security` 。
    
    `Security` 声明依赖项的方式和 `Depends` 一样,但 `Security` 还能接收作用域(字符串)列表类型的参数 `scopes`。
    
    此处使用与 `Depends` 相同的方式,把依赖项函数 `get_current_active_user` 传递给 `Security`。
    
    同时,还传递了作用域**列表**,本例中只传递了一个作用域:`items`(此处支持传递更多作用域)。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:43:35 GMT 2024
    - 11.8K bytes
    - Viewed (0)
Back to top