Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 57 of 57 for get_current_user (0.18 sec)

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

        사양을 준수하기 위해 스스로 올바르게 수행하기 위해 거의 유일하게 기억해야 하는 것입니다.
    
        나머지는 **FastAPI**가 처리합니다.
    
    ## 의존성 업데이트하기
    
    이제 의존성을 업데이트를 할 겁니다.
    
    이 사용자가 활성화되어 있는 *경우에만* `current_user`를 가져올 겁니다.
    
    따라서 `get_current_user`를 의존성으로 사용하는 추가 종속성 `get_current_active_user`를 만듭니다.
    
    이러한 의존성 모두, 사용자가 존재하지 않거나 비활성인 경우 HTTP 오류를 반환합니다.
    
    따라서 엔드포인트에서는 사용자가 존재하고 올바르게 인증되었으며 활성 상태인 경우에만 사용자를 얻습니다:
    
    === "파이썬 3.7 이상"
    
    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)
  2. docs/de/docs/tutorial/security/oauth2-jwt.md

        ```Python hl_lines="6  12-14  28-30  78-86"
        {!> ../../../docs_src/security/tutorial004.py!}
        ```
    
    ## Die Abhängigkeiten aktualisieren
    
    Aktualisieren Sie `get_current_user`, um den gleichen Token wie zuvor zu erhalten, dieses Mal jedoch unter Verwendung von JWT-Tokens.
    
    Dekodieren Sie den empfangenen Token, validieren Sie ihn und geben Sie den aktuellen Benutzer zurück.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:27:06 GMT 2024
    - 15.1K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/security/simple-oauth2.md

    Jetzt werden wir unsere Abhängigkeiten aktualisieren.
    
    Wir möchten den `current_user` *nur* erhalten, wenn dieser Benutzer aktiv ist.
    
    Daher erstellen wir eine zusätzliche Abhängigkeit `get_current_active_user`, die wiederum `get_current_user` als Abhängigkeit verwendet.
    
    Beide Abhängigkeiten geben nur dann einen HTTP-Error zurück, wenn der Benutzer nicht existiert oder inaktiv ist.
    
    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)
  4. docs/en/docs/tutorial/security/simple-oauth2.md

    Now we are going to update our dependencies.
    
    We want to get the `current_user` *only* if this user is active.
    
    So, we create an additional dependency `get_current_active_user` that in turn uses `get_current_user` as a dependency.
    
    Both of these dependencies will just return an HTTP error if the user doesn't exist, or if is inactive.
    
    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)
  5. docs/em/docs/tutorial/security/oauth2-jwt.md

        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    
        ```Python hl_lines="5  11-13  27-29  77-85"
        {!> ../../../docs_src/security/tutorial004_py310.py!}
        ```
    
    ## ℹ 🔗
    
    ℹ `get_current_user` 📨 🎏 🤝 ⏭, ✋️ 👉 🕰, ⚙️ 🥙 🤝.
    
    🔣 📨 🤝, ✔ ⚫️, & 📨 ⏮️ 👩‍💻.
    
    🚥 🤝 ❌, 📨 🇺🇸🔍 ❌ ▶️️ ↖️.
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="89-106"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  6. docs/ja/docs/tutorial/security/oauth2-jwt.md

    レスポンスのトークンエンドポイントで使用するPydanticモデルを定義します。
    
    新しいアクセストークンを生成するユーティリティ関数を作成します。
    
    ```Python hl_lines="6  12-14  28-30  78-86"
    {!../../../docs_src/security/tutorial004.py!}
    ```
    
    ## 依存関係の更新
    
    `get_current_user`を更新して、先ほどと同じトークンを受け取るようにしますが、今回はJWTトークンを使用します。
    
    受け取ったトークンを復号して検証し、現在のユーザーを返します。
    
    トークンが無効な場合は、すぐにHTTPエラーを返します。
    
    ```Python hl_lines="89-106"
    {!../../../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)
  7. docs/en/docs/release-notes.md

    For example, you could have code like this:
    
    ```Python
    def get_current_user(token: str):
        # authenticate user
        return User()
    
    
    @app.get("/items/")
    def read_items(user: User = Depends(get_current_user)):
        ...
    
    
    @app.post("/items/")
    def create_item(*, user: User = Depends(get_current_user), item: Item):
        ...
    
    
    @app.get("/items/{item_id}")
    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)
Back to top