Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for 10 (0.58 sec)

  1. docs/ko/docs/tutorial/security/get-current-user.md

    # 현재 사용자 가져오기
    
    이전 장에서 (의존성 주입 시스템을 기반으로 한)보안 시스템은 *경로 작동 함수*에서 `str`로 `token`을 제공했습니다:
    
    ```Python hl_lines="10"
    {!../../../docs_src/security/tutorial001.py!}
    ```
    
    그러나 아직도 유용하지 않습니다.
    
    현재 사용자를 제공하도록 합시다.
    
    ## 유저 모델 생성하기
    
    먼저 Pydantic 유저 모델을 만들어 보겠습니다.
    
    Pydantic을 사용하여 본문을 선언하는 것과 같은 방식으로 다른 곳에서 사용할 수 있습니다.
    
    === "파이썬 3.7 이상"
    
        ```Python hl_lines="5  12-16"
        {!> ../../../docs_src/security/tutorial002.py!}
        ```
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/security/get-current-user.md

        {!> ../../../docs_src/security/tutorial001_an.py!}
        ```
    
    === "Python 3.8+ nicht annotiert"
    
        !!! tip "Tipp"
            Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
        ```Python hl_lines="10"
        {!> ../../../docs_src/security/tutorial001.py!}
        ```
    
    Aber das ist immer noch nicht so nützlich.
    
    Lassen wir es uns den aktuellen Benutzer überreichen.
    
    ## Ein Benutzermodell erstellen
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:08:05 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  3. docs/ja/docs/tutorial/security/get-current-user.md

    # 現在のユーザーの取得
    
    一つ前の章では、(依存性注入システムに基づいた)セキュリティシステムは、 *path operation関数* に `str` として `token` を与えていました:
    
    ```Python hl_lines="10"
    {!../../../docs_src/security/tutorial001.py!}
    ```
    
    しかし、それはまだそんなに有用ではありません。
    
    現在のユーザーを取得するようにしてみましょう。
    
    ## ユーザーモデルの作成
    
    まずは、Pydanticのユーザーモデルを作成しましょう。
    
    ボディを宣言するのにPydanticを使用するのと同じやり方で、Pydanticを別のどんなところでも使うことができます:
    
    ```Python hl_lines="5  12-16"
    {!../../../docs_src/security/tutorial002.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Jan 28 18:36:35 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  4. docs/zh/docs/tutorial/security/get-current-user.md

    # 获取当前用户
    
    上一章中,(基于依赖注入系统的)安全系统向*路径操作函数*传递了 `str` 类型的 `token`:
    
    ```Python hl_lines="10"
    {!../../../docs_src/security/tutorial001.py!}
    ```
    
    但这并不实用。
    
    接下来,我们学习如何返回当前用户。
    
    
    ## 创建用户模型
    
    首先,创建 Pydantic 用户模型。
    
    与使用 Pydantic 声明请求体相同,并且可在任何位置使用:
    
    ```Python hl_lines="5  12-16"
    {!../../../docs_src/security/tutorial002.py!}
    ```
    
    ## 创建 `get_current_user` 依赖项
    
    创建 `get_current_user` 依赖项。
    
    还记得依赖项支持子依赖项吗?
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:46:46 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/security/get-current-user.md

        {!> ../../../docs_src/security/tutorial001_an.py!}
        ```
    
    === "Python 3.8+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="10"
        {!> ../../../docs_src/security/tutorial001.py!}
        ```
    
    But that is still not that useful.
    
    Let's make it give us the current user.
    
    ## Create a user model
    
    First, let's create a Pydantic user model.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 7.6K bytes
    - Viewed (0)
Back to top