Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 16 of 16 for HTTPBearer (0.25 sec)

  1. docs/es/docs/how-to/authentication-error-status-code.md

    Pero si por alguna razón tus clientes dependen del comportamiento anterior, puedes volver a él sobrescribiendo el método `make_not_authenticated_error` en tus clases de seguridad.
    
    Por ejemplo, puedes crear una subclase de `HTTPBearer` que devuelva un error `403 Forbidden` en lugar del `401 Unauthorized` por defecto:
    
    {* ../../docs_src/authentication_error_status_code/tutorial001_an_py39.py hl[9:13] *}
    
    /// tip | Consejo
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:16:35 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  2. docs/de/docs/how-to/authentication-error-status-code.md

    Sie können beispielsweise eine Unterklasse von `HTTPBearer` erstellen, die einen Fehler `403 Forbidden` zurückgibt, statt des Default-`401 Unauthorized`-Fehlers:
    
    {* ../../docs_src/authentication_error_status_code/tutorial001_an_py39.py hl[9:13] *}
    
    /// tip | Tipp
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 02 17:32:56 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  3. docs/en/docs/how-to/authentication-error-status-code.md

    But if for some reason your clients depend on the old behavior, you can revert to it by overriding the method `make_not_authenticated_error` in your security classes.
    
    For example, you can create a subclass of `HTTPBearer` that returns a `403 Forbidden` error instead of the default `401 Unauthorized` error:
    
    {* ../../docs_src/authentication_error_status_code/tutorial001_an_py39.py hl[9:13] *}
    
    /// tip
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 24 19:03:06 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  4. docs/pt/docs/how-to/authentication-error-status-code.md

    Mas, se por algum motivo seus clientes dependem do comportamento antigo, você pode voltar a ele sobrescrevendo o método `make_not_authenticated_error` nas suas classes de segurança.
    
    Por exemplo, você pode criar uma subclasse de `HTTPBearer` que retorne um erro `403 Forbidden` em vez do erro padrão `401 Unauthorized`:
    
    {* ../../docs_src/authentication_error_status_code/tutorial001_an_py39.py hl[9:13] *}
    
    /// tip | Dica
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 19:59:04 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  5. fastapi/openapi/models.py

        in_: APIKeyIn = Field(alias="in")
        name: str
    
    
    class HTTPBase(SecurityBase):
        type_: SecuritySchemeType = Field(default=SecuritySchemeType.http, alias="type")
        scheme: str
    
    
    class HTTPBearer(HTTPBase):
        scheme: Literal["bearer"] = "bearer"
        bearerFormat: Optional[str] = None
    
    
    class OAuthFlow(BaseModelWithConfig):
        refreshUrl: Optional[str] = None
        scopes: dict[str, str] = {}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  6. docs/en/docs/release-notes.md

    ## 0.27.1
    
    * Fix `auto_error=False` handling in `HTTPBearer` security scheme. Do not `raise` when there's an incorrect `Authorization` header if `auto_error=False`. PR [#282](https://github.com/tiangolo/fastapi/pull/282).
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
Back to top