Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for 58 (0.16 sec)

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

    使之仅在当前用户为激活状态时,才能获取 `current_user`。
    
    为此,要再创建一个依赖项 `get_current_active_user`,此依赖项以 `get_current_user` 依赖项为基础。
    
    如果用户不存在,或状态为未激活,这两个依赖项都会返回 HTTP 错误。
    
    因此,在端点中,只有当用户存在、通过身份验证、且状态为激活时,才能获得该用户:
    
    ```Python hl_lines="58-67  69-72  90"
    {!../../../docs_src/security/tutorial003.py!}
    ```
    
    !!! info "说明"
    
        此处返回值为 `Bearer` 的响应头 `WWW-Authenticate` 也是规范的一部分。
    
        任何 401**UNAUTHORIZED**HTTP(错误)状态码都应返回 `WWW-Authenticate` 响应头。
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 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

    👯‍♂️ 👉 🔗 🔜 📨 🇺🇸🔍 ❌ 🚥 👩‍💻 🚫 🔀, ⚖️ 🚥 🔕.
    
    , 👆 🔗, 👥 🔜 🕴 🤚 👩‍💻 🚥 👩‍💻 🔀, ☑ 🔓, & 🦁:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="58-66  69-72  90"
        {!> ../../../docs_src/security/tutorial003.py!}
        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    
        ```Python hl_lines="55-64  67-70  88"
        {!> ../../../docs_src/security/tutorial003_py310.py!}
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/security/simple-oauth2.md

    === "Python 3.10+"
    
        ```Python hl_lines="58-66  69-74  94"
        {!> ../../../docs_src/security/tutorial003_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="58-66  69-74  94"
        {!> ../../../docs_src/security/tutorial003_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 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

    === "Python 3.10+"
    
        ```Python hl_lines="58-66  69-74  94"
        {!> ../../../docs_src/security/tutorial003_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="58-66  69-74  94"
        {!> ../../../docs_src/security/tutorial003_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  5. docs/ko/docs/tutorial/security/simple-oauth2.md

    이러한 의존성 모두, 사용자가 존재하지 않거나 비활성인 경우 HTTP 오류를 반환합니다.
    
    따라서 엔드포인트에서는 사용자가 존재하고 올바르게 인증되었으며 활성 상태인 경우에만 사용자를 얻습니다:
    
    === "파이썬 3.7 이상"
    
        ```Python hl_lines="58-66  69-72  90"
        {!> ../../../docs_src/security/tutorial003.py!}
        ```
    
    === "파이썬 3.10 이상"
    
        ```Python hl_lines="55-64  67-70  88"
        {!> ../../../docs_src/security/tutorial003_py310.py!}
        ```
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 22:37:23 GMT 2024
    - 11.6K bytes
    - Viewed (0)
Back to top