Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for HTTPException (0.08 sec)

  1. fastapi/__init__.py

    from starlette import status as status
    
    from .applications import FastAPI as FastAPI
    from .background import BackgroundTasks as BackgroundTasks
    from .datastructures import UploadFile as UploadFile
    from .exceptions import HTTPException as HTTPException
    from .exceptions import WebSocketException as WebSocketException
    from .param_functions import Body as Body
    from .param_functions import Cookie as Cookie
    from .param_functions import Depends as Depends
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 21:51:55 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  2. fastapi/security/oauth2.py

    from typing import Any, Dict, List, Optional, Union, cast
    
    from fastapi.exceptions import HTTPException
    from fastapi.openapi.models import OAuth2 as OAuth2Model
    from fastapi.openapi.models import OAuthFlows as OAuthFlowsModel
    from fastapi.param_functions import Form
    from fastapi.security.base import SecurityBase
    from fastapi.security.utils import get_authorization_scheme_param
    from starlette.requests import Request
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 23 18:30:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/security/oauth2-scopes.md

    The `security_scopes` object (of class `SecurityScopes`) also provides a `scope_str` attribute with a single string, containing those scopes separated by spaces (we are going to use it).
    
    We create an `HTTPException` that we can reuse (`raise`) later at several points.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 29 11:02:16 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  4. docs/pt/docs/advanced/websockets.md

    {*../../docs_src/websockets/tutorial002_an_py310.py hl[68:69,82]*}
    
    /// info | Informação
    
    Como isso é um WebSocket, não faz muito sentido levantar uma `HTTPException`, em vez disso levantamos uma `WebSocketException`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Oct 31 12:20:59 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  5. 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:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 26 16:01:27 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  6. docs/de/docs/advanced/security/http-basic-auth.md

    ### Den Error zurückgeben
    
    Nachdem Sie festgestellt haben, dass die Anmeldeinformationen falsch sind, geben Sie eine `HTTPException` mit dem Statuscode 401 zurück (derselbe, der auch zurückgegeben wird, wenn keine Anmeldeinformationen angegeben werden) und fügen den Header `WWW-Authenticate` hinzu, damit der Browser die Anmeldeaufforderung erneut anzeigt:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 15:25:54 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  7. docs/pt/docs/tutorial/security/simple-oauth2.md

    Se não existir tal usuário, retornaremos um erro dizendo "Incorrect username or password" (Nome de usuário ou senha incorretos).
    
    Para o erro, usamos a exceção `HTTPException`:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="3  79-81"
    {!> ../../docs_src/security/tutorial003_an_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="3  79-81"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Oct 31 12:17:45 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  8. docs/en/docs/release-notes.md

    ### Dependencies with `yield`, `HTTPException` and Background Tasks
    
    Dependencies with `yield` now can raise `HTTPException` and other exceptions after `yield`. 🎉
    
    Read the new docs here: [Dependencies with `yield` and `HTTPException`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#dependencies-with-yield-and-httpexception).
    
    ```Python
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Nov 01 11:25:57 UTC 2024
    - 460.3K bytes
    - Viewed (0)
Back to top