- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,297 for Bearer (0.08 sec)
-
tests/test_tutorial/test_security/test_tutorial005.py
assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_token(): access_token = get_access_token(scope="me") response = client.get( "/users/me", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 200, response.text assert response.json() == { "username": "johndoe",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003_an_py310.py
assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py310 def test_token(client: TestClient): response = client.get("/users/me", headers={"Authorization": "Bearer johndoe"}) assert response.status_code == 200, response.text assert response.json() == { "username": "johndoe",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003_py310.py
assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py310 def test_token(client: TestClient): response = client.get("/users/me", headers={"Authorization": "Bearer johndoe"}) assert response.status_code == 200, response.text assert response.json() == { "username": "johndoe",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an.py
assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_token(): access_token = get_access_token(scope="me") response = client.get( "/users/me", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 200, response.text assert response.json() == { "username": "johndoe",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_py310.py
assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py310 def test_token(client: TestClient): 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() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_py39.py
assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py39 def test_token(client: TestClient): 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() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an_py39.py
assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py39 def test_token(client: TestClient): 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() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (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"`
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 19 09:47:28 UTC 2024 - 13.2K bytes - Viewed (0) -
tests/test_security_http_bearer_optional.py
client = TestClient(app) def test_security_http_bearer(): response = client.get("/users/me", headers={"Authorization": "Bearer foobar"}) assert response.status_code == 200, response.text assert response.json() == {"scheme": "Bearer", "credentials": "foobar"} def test_security_http_bearer_no_credentials(): response = client.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer_description.py
from fastapi.testclient import TestClient app = FastAPI() oauth2_scheme = OAuth2AuthorizationCodeBearer( authorizationUrl="authorize", tokenUrl="token", description="OAuth2 Code Bearer", auto_error=True, ) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): return {"token": token} client = TestClient(app)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.4K bytes - Viewed (0)