Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for geturl (0.17 sec)

  1. docs/en/docs/advanced/security/http-basic-auth.md

    That way, using `secrets.compare_digest()` in your application code, it will be safe against this whole range of security attacks.
    
    ### Return the error
    
    After detecting that the credentials are incorrect, return an `HTTPException` with a status code 401 (the same returned when no credentials are provided) and add the header `WWW-Authenticate` to make the browser show the login prompt again:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 14:33:05 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  2. docs/em/docs/advanced/security/http-basic-auth.md

    ```Python hl_lines="1  11-21"
    {!../../../docs_src/security/tutorial007.py!}
    ```
    
    👉 🔜 🎏:
    
    ```Python
    if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
        # Return some error
        ...
    ```
    
    ✋️ ⚙️ `secrets.compare_digest()` ⚫️ 🔜 🔐 🛡 🆎 👊 🤙 "🕰 👊".
    
    ### ⏲ 👊
    
    ✋️ ⚫️❔ "⏲ 👊"❓
    
    ➡️ 🌈 👊 🔄 💭 🆔 & 🔐.
    
    & 👫 📨 📨 ⏮️ 🆔 `johndoe` & 🔐 `love123`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 4.1K bytes
    - Viewed (0)
Back to top