- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 260 for Bearer (0.05 seconds)
-
tests/test_tutorial/test_security/test_tutorial004.py
assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_token(mod: ModuleType): client = TestClient(mod.app) access_token = get_access_token(client=client) response = client.get( "/users/me", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 200, response.text assert response.json() == {
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 13.3K bytes - Click Count (0) -
fastapi/security/http.py
The HTTP authorization header value is split by the first space. The first part is the `scheme`, the second part is the `credentials`. For example, in an HTTP Bearer token scheme, the client will send a header like: ``` Authorization: Bearer deadbeef12346 ``` In this case: * `scheme` will have the value `"Bearer"`Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 13.2K bytes - Click Count (0) -
tests/test_tutorial/test_security/test_tutorial005.py
assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_token(mod: ModuleType): client = TestClient(mod.app) access_token = get_access_token(scope="me", client=client) response = client.get( "/users/me", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 200, response.text assert response.json() == {
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 15.8K bytes - Click Count (0) -
docs/de/docs/tutorial/security/first-steps.md
FastAPI wird im <abbr title="Request – Anfrage: Daten, die der Client zum Server sendet">Request</abbr> nach diesem `Authorization`-Header suchen, prüfen, ob der Wert `Bearer ` plus ein Token ist, und den Token als `str` zurückgeben. Wenn es keinen `Authorization`-Header sieht, oder der Wert keinen `Bearer `-Token hat, antwortet es direkt mit einem 401-Statuscode-Error (`UNAUTHORIZED`).
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Sep 20 15:10:09 GMT 2025 - 9.9K bytes - Click Count (0) -
docs/pt/docs/tutorial/security/simple-oauth2.md
# Simples OAuth2 com senha e Bearer { #simple-oauth2-with-password-and-bearer } Agora vamos construir a partir do capítulo anterior e adicionar as partes que faltam para ter um fluxo de segurança completo. ## Obtenha o `username` e a `password` { #get-the-username-and-password } É utilizado o utils de segurança da **FastAPI** para obter o `username` e a `password`.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Nov 12 16:23:57 GMT 2025 - 10.3K bytes - Click Count (0) -
docs/ru/docs/tutorial/security/simple-oauth2.md
/// info | Дополнительная информация Дополнительный HTTP-заголовок `WWW-Authenticate` со значением `Bearer`, который мы здесь возвращаем, также является частью спецификации. Любой HTTP статус-код 401 "UNAUTHORIZED" должен также возвращать заголовок `WWW-Authenticate`. В случае с bearer-токенами (наш случай) значение этого заголовка должно быть `Bearer`. Фактически, этот дополнительный заголовок можно опустить, и всё будет работать.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 30 11:24:39 GMT 2025 - 16.3K bytes - Click Count (0) -
docs/ru/docs/tutorial/security/first-steps.md
* Но для этого для конкретной конечной точки нужна аутентификация. * Поэтому, чтобы аутентифицироваться в нашем API, он отправляет HTTP-заголовок `Authorization` со значением `Bearer ` плюс сам токен. * Если токен содержит `foobar`, то содержимое заголовка `Authorization` будет: `Bearer foobar`. ## Класс `OAuth2PasswordBearer` в **FastAPI** { #fastapis-oauth2passwordbearer }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 30 11:24:39 GMT 2025 - 14.2K bytes - Click Count (0) -
fastapi/security/oauth2.py
The OAuth 2 specification doesn't define the challenge that should be used, because a `Bearer` token is not really the only option to authenticate. But declaring any other authentication challenge would be application-specific as it's not defined in the specification. For practical reasons, this method uses the `Bearer` challenge by default, as it's probably the most common one.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 22K bytes - Click Count (0) -
docs/es/docs/tutorial/security/simple-oauth2.md
/// info | Información El header adicional `WWW-Authenticate` con el valor `Bearer` que estamos devolviendo aquí también es parte de la especificación. Cualquier código de estado HTTP (error) 401 "UNAUTHORIZED" se supone que también debe devolver un header `WWW-Authenticate`. En el caso de tokens bearer (nuestro caso), el valor de ese header debe ser `Bearer`.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Dec 16 16:33:45 GMT 2025 - 10.3K bytes - Click Count (0) -
docs/de/docs/tutorial/security/simple-oauth2.md
/// info | Info Der zusätzliche Header `WWW-Authenticate` mit dem Wert `Bearer`, den wir hier zurückgeben, ist ebenfalls Teil der Spezifikation. Jeder HTTP-(Fehler-)Statuscode 401 „UNAUTHORIZED“ soll auch einen `WWW-Authenticate`-Header zurückgeben. Im Fall von Bearer-Tokens (in unserem Fall) sollte der Wert dieses Headers `Bearer` lauten. Sie können diesen zusätzlichen Header tatsächlich weglassen und es würde trotzdem funktionieren.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Sep 20 15:10:09 GMT 2025 - 11.2K bytes - Click Count (0)