Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 17 for read_own_items (0.09 seconds)

  1. docs_src/security/tutorial004_an_py310.py

    @app.get("/users/me/")
    async def read_users_me(
        current_user: Annotated[User, Depends(get_current_active_user)],
    ) -> User:
        return current_user
    
    
    @app.get("/users/me/items/")
    async def read_own_items(
        current_user: Annotated[User, Depends(get_current_active_user)],
    ):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 18:10:35 GMT 2026
    - 4.2K bytes
    - Click Count (0)
  2. docs_src/security/tutorial004_py310.py

    
    @app.get("/users/me/")
    async def read_users_me(current_user: User = Depends(get_current_active_user)) -> User:
        return current_user
    
    
    @app.get("/users/me/items/")
    async def read_own_items(current_user: User = Depends(get_current_active_user)):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 18:10:35 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  3. docs_src/security/tutorial005_py310.py

    
    @app.get("/users/me/")
    async def read_users_me(current_user: User = Depends(get_current_active_user)) -> User:
        return current_user
    
    
    @app.get("/users/me/items/")
    async def read_own_items(
        current_user: User = Security(get_current_active_user, scopes=["items"]),
    ):
        return [{"item_id": "Foo", "owner": current_user.username}]
    
    
    @app.get("/status/")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 18:10:35 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  4. docs_src/security/tutorial005_an_py310.py

    @app.get("/users/me/")
    async def read_users_me(
        current_user: Annotated[User, Depends(get_current_active_user)],
    ) -> User:
        return current_user
    
    
    @app.get("/users/me/items/")
    async def read_own_items(
        current_user: Annotated[User, Security(get_current_active_user, scopes=["items"])],
    ):
        return [{"item_id": "Foo", "owner": current_user.username}]
    
    
    @app.get("/status/")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 18:10:35 GMT 2026
    - 5.4K bytes
    - Click Count (0)
  5. docs/en/docs/advanced/security/oauth2-scopes.md

    Here's how the hierarchy of dependencies and scopes looks like:
    
    * The *path operation* `read_own_items` has:
        * Required scopes `["items"]` with the dependency:
        * `get_current_active_user`:
            *  The dependency function `get_current_active_user` has:
                * Required scopes `["me"]` with the dependency:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 13.4K bytes
    - Click Count (0)
  6. docs/zh-hant/docs/advanced/security/oauth2-scopes.md

    路徑操作本身也宣告了 `"items"` 這個 scope,因此它也會包含在傳給 `get_current_user` 的 `security_scopes.scopes` 中。
    
    以下是相依性與 scopes 的階層關係:
    
    - 路徑操作 `read_own_items` 具有:
      - 需要的 scopes `["items"]`,並有相依性:
      - `get_current_active_user`:
        - 相依函式 `get_current_active_user` 具有:
          - 需要的 scopes `["me"]`,並有相依性:
          - `get_current_user`:
            - 相依函式 `get_current_user` 具有:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 12.7K bytes
    - Click Count (0)
  7. docs/zh/docs/advanced/security/oauth2-scopes.md

    *路径操作*本身也声明了一个作用域 `"items"`,它也会包含在传给 `get_current_user` 的 `security_scopes.scopes` 列表中。
    
    依赖与作用域的层级结构如下:
    
    * *路径操作* `read_own_items` 包含:
        * 带有依赖的必需作用域 `["items"]`:
        * `get_current_active_user`:
            *  依赖函数 `get_current_active_user` 包含:
                * 带有依赖的必需作用域 `["me"]`:
                * `get_current_user`:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 13K bytes
    - Click Count (0)
  8. docs/ja/docs/advanced/security/oauth2-scopes.md

    path operation 自体も `"items"` スコープを宣言するため、これも `get_current_user` に渡される `security_scopes.scopes` に含まれます。
    
    依存関係とスコープの階層は次のようになります:
    
    - *path operation* `read_own_items` には:
        - 依存関係に対して必須スコープ `["items"]` がある:
        - `get_current_active_user`:
            - 依存関数 `get_current_active_user` には:
                - 依存関係に対して必須スコープ `["me"]` がある:
                - `get_current_user`:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 16.6K bytes
    - Click Count (0)
  9. docs/tr/docs/advanced/security/oauth2-scopes.md

    *Path operation*'ın kendisi de `"items"` scope'unu tanımlar; bu da `get_current_user`'a geçirilen `security_scopes.scopes` listesinde yer alır.
    
    Dependency'lerin ve scope'ların hiyerarşisi şöyle görünür:
    
    * *Path operation* `read_own_items` şunlara sahiptir:
        * Dependency ile gerekli scope'lar `["items"]`:
        * `get_current_active_user`:
            * `get_current_active_user` dependency fonksiyonu şunlara sahiptir:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 14.7K bytes
    - Click Count (0)
  10. docs/ru/docs/advanced/security/oauth2-scopes.md

    Сама операция пути тоже объявляет scope — `"items"`, поэтому он также будет в списке `security_scopes.scopes`, передаваемом в `get_current_user`.
    
    Иерархия зависимостей и scopes выглядит так:
    
    - Операция пути `read_own_items`:
      - Запрашивает scopes `["items"]` с зависимостью:
      - `get_current_active_user`:
        - Функция‑зависимость `get_current_active_user`:
          - Запрашивает scopes `["me"]` с зависимостью:
          - `get_current_user`:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 20.6K bytes
    - Click Count (0)
Back to Top