Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for HTTPException (0.24 sec)

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

        이 예제에서는 `scopes`를 사용하지 않지만 필요한 경우, 기능이 있습니다.
    
    이제 폼 필드의 `username`을 사용하여 (가짜) 데이터베이스에서 유저 데이터를 가져옵니다.
    
    해당 사용자가 없으면 "잘못된 사용자 이름 또는 패스워드"라는 오류가 반환됩니다.
    
    오류의 경우 `HTTPException` 예외를 사용합니다:
    
    === "파이썬 3.7 이상"
    
        ```Python hl_lines="3  77-79"
        {!> ../../../docs_src/security/tutorial003.py!}
        ```
    
    === "파이썬 3.10 이상"
    
        ```Python hl_lines="1  75-77"
    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/simple-oauth2.md

    Wenn es keinen solchen Benutzer gibt, geben wir die Fehlermeldung „Incorrect username or password“ zurück.
    
    Für den Fehler verwenden wir die Exception `HTTPException`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="3  79-81"
        {!> ../../../docs_src/security/tutorial003_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="3  79-81"
    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)
  3. docs/en/docs/tutorial/security/simple-oauth2.md

    Now, get the user data from the (fake) database, using the `username` from the form field.
    
    If there is no such user, we return an error saying "Incorrect username or password".
    
    For the error, we use the exception `HTTPException`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="3  79-81"
        {!> ../../../docs_src/security/tutorial003_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="3  79-81"
    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)
Back to top