- Sort Score
- Result 10 results
- Languages All
Results 191 - 200 of 527 for broken (0.1 sec)
-
docs_src/app_testing/app_b_py310/main.py
if item_id not in fake_db: raise HTTPException(status_code=404, detail="Item not found") return fake_db[item_id] @app.post("/items/", response_model=Item) async def create_item(item: Item, x_token: str = Header()): if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header") if item.id in fake_db:
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Jan 09 14:44:08 UTC 2024 - 1.1K bytes - Viewed (0) -
docs/zh/docs/tutorial/security/first-steps.md
```Python hl_lines="6" {!../../docs_src/security/tutorial001.py!} ``` /// tip | "提示" 在此,`tokenUrl="token"` 指向的是暂未创建的相对 URL `token`。这个相对 URL 相当于 `./token`。 因为使用的是相对 URL,如果 API 位于 `https://example.com/`,则指向 `https://example.com/token`。但如果 API 位于 `https://example.com/api/v1/`,它指向的就是`https://example.com/api/v1/token`。 使用相对 URL 非常重要,可以确保应用在遇到[使用代理](../../advanced/behind-a-proxy.md){.internal-link target=_blank}这样的高级用例时,也能正常运行。
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial001_an_py39.py
@needs_py39 def test_token(client: TestClient): response = client.get("/items", headers={"Authorization": "Bearer testtoken"}) assert response.status_code == 200, response.text assert response.json() == {"token": "testtoken"} @needs_py39 def test_incorrect_token(client: TestClient): response = client.get("/items", headers={"Authorization": "Notexistent testtoken"}) assert response.status_code == 401, response.text
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
docs_src/app_testing/app_b_an_py39/main.py
if item_id not in fake_db: raise HTTPException(status_code=404, detail="Item not found") return fake_db[item_id] @app.post("/items/", response_model=Item) async def create_item(item: Item, x_token: Annotated[str, Header()]): if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header") if item.id in fake_db:
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Thu Aug 15 22:31:16 UTC 2024 - 1.1K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial001_an.py
def test_token(): response = client.get("/items", headers={"Authorization": "Bearer testtoken"}) assert response.status_code == 200, response.text assert response.json() == {"token": "testtoken"} def test_incorrect_token(): response = client.get("/items", headers={"Authorization": "Notexistent testtoken"}) assert response.status_code == 401, response.text
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.9K bytes - Viewed (0) -
cmd/sts-handlers_test.go
if err != nil { c.Fatalf("bucket create error: %v", err) } // Generate web identity STS token by interacting with OpenID IDP. token, err := MockOpenIDTestUserInteraction(ctx, testAppParams, "******@****.***", "dillon") if err != nil { c.Fatalf("mock user err: %v", err) } // fmt.Printf("TOKEN: %s\n", token) webID := cr.STSWebIdentity{ Client: s.TestSuiteCommon.client,
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Thu Oct 10 23:40:37 UTC 2024 - 97.1K bytes - Viewed (0) -
docs/en/docs/tutorial/security/simple-oauth2.md
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 12.3K bytes - Viewed (0) -
tests/test_security_http_bearer_description.py
from fastapi import FastAPI, Security from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer from fastapi.testclient import TestClient app = FastAPI() 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}
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.2K bytes - Viewed (0) -
cmd/lock-rest-server-common_test.go
ll: &localLocker{ mutex: sync.Mutex{}, lockMap: make(map[string][]lockRequesterInfo), }, } creds := globalActiveCred token, err := authenticateNode(creds.AccessKey, creds.SecretKey) if err != nil { t.Fatal(err) } return fsDir, locker, token } // Test function to remove lock entries from map based on name & uid combination func TestLockRpcServerRemoveEntry(t *testing.T) {
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 3.2K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/es/config/bsentity/dbmeta/AccessTokenDbm.java
Registered: Mon Oct 28 08:04:08 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 11.3K bytes - Viewed (0)