- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 740 for Users (0.02 sec)
-
tests/test_security_http_bearer.py
app = FastAPI() security = HTTPBearer() @app.get("/users/me") def read_current_user(credentials: HTTPAuthorizationCredentials = Security(security)): return {"scheme": credentials.scheme, "credentials": credentials.credentials} client = TestClient(app) def test_security_http_bearer(): response = client.get("/users/me", headers={"Authorization": "Bearer foobar"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_security_http_digest_description.py
security = HTTPDigest(description="HTTPDigest scheme") @app.get("/users/me") def read_current_user(credentials: HTTPAuthorizationCredentials = Security(security)): return {"scheme": credentials.scheme, "credentials": credentials.credentials} client = TestClient(app) def test_security_http_digest(): response = client.get("/users/me", headers={"Authorization": "Digest foobar"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.2K bytes - Viewed (0) -
tests/test_security_oauth2.py
from pydantic import BaseModel app = FastAPI() reusable_oauth2 = OAuth2( flows={ "password": { "tokenUrl": "token", "scopes": {"read:users": "Read the users", "write:users": "Create users"}, } } ) class User(BaseModel): username: str # Here we use string annotations to test them def get_current_user(oauth_header: "str" = Security(reusable_oauth2)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.7K bytes - Viewed (0) -
tests/test_security_http_bearer_description.py
security = HTTPBearer(description="HTTP Bearer token scheme") @app.get("/users/me") def read_current_user(credentials: HTTPAuthorizationCredentials = Security(security)): return {"scheme": credentials.scheme, "credentials": credentials.credentials} client = TestClient(app) def test_security_http_bearer(): response = client.get("/users/me", headers={"Authorization": "Bearer foobar"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.2K bytes - Viewed (0) -
cmd/iam-object-store_test.go
}{ {"format.json", false, "format.json", ""}, {"users/tester.json", false, "users/", "tester.json"}, {"groups/test/group.json", false, "groups/", "test/group.json"}, {"policydb/groups/testgroup.json", true, "policydb/groups/", "testgroup.json"}, { "policydb/sts-users/uid=slash/user,ou=people,ou=swengg,dc=min,dc=io.json", true, "policydb/sts-users/", "uid=slash/user,ou=people,ou=swengg,dc=min,dc=io.json", }, {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 10 23:40:37 UTC 2024 - 2K bytes - Viewed (0) -
tests/joins_test.go
} else if len(users2) != len(users) { t.Fatalf("Failed to load join users, got: %v, expect: %v", len(users2), len(users)) } sort.Slice(users2, func(i, j int) bool { return users2[i].ID > users2[j].ID }) sort.Slice(users, func(i, j int) bool { return users[i].ID > users[j].ID }) for idx, user := range users { // user CheckUser(t, user, users2[idx])
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:58:13 UTC 2024 - 15K bytes - Viewed (0) -
docs_src/metadata/tutorial004.py
from fastapi import FastAPI tags_metadata = [ { "name": "users", "description": "Operations with users. The **login** logic is also here.", }, { "name": "items", "description": "Manage items. So _fancy_ they have their own docs.", "externalDocs": { "description": "Items external docs", "url": "https://fastapi.tiangolo.com/", }, }, ]
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jun 13 11:58:06 UTC 2020 - 693 bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial006_an_py39.py
@needs_py39 def test_security_http_basic(client: TestClient): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text assert response.json() == {"username": "john", "password": "secret"} @needs_py39 def test_security_http_basic_no_credentials(client: TestClient): response = client.get("/users/me") assert response.json() == {"detail": "Not authenticated"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.5K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003_an.py
def test_no_token(): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_token(): response = client.get("/users/me", headers={"Authorization": "Bearer johndoe"}) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8K bytes - Viewed (0) -
docs/pt/docs/tutorial/bigger-applications.md
O módulo `items` terá uma variável `router` (`items.router`). Esta é a mesma que criamos no arquivo `app/routers/items.py`, é um objeto `APIRouter`. E então fazemos o mesmo para o módulo `users`. Também poderíamos importá-los como: ```Python from app.routers import items, users ``` /// info | "Informação"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 19.6K bytes - Viewed (0)