- Sort Score
- Num 10 results
- Language All
Results 1501 - 1510 of 1,765 for header (0.04 seconds)
-
docs/zh-hant/docs/tutorial/security/first-steps.md
- 但該端點需要驗證。 - 因此為了向 API 驗證,請求會帶上一個 `Authorization` 標頭,值為 `Bearer ` 加上 token。 - 例如 token 是 `foobar`,則 `Authorization` 標頭內容為:`Bearer foobar`。 ## FastAPI 的 `OAuth2PasswordBearer` { #fastapis-oauth2passwordbearer } FastAPI 提供多層抽象的工具來實作這些安全機制。 本例將使用 OAuth2 的 Password 流程,並以 Bearer token 進行驗證;我們會用 `OAuth2PasswordBearer` 類別來完成。 /// info 「Bearer」token 不是唯一選項。 但對本例最合適。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 7.2K bytes - Click Count (0) -
docs/zh/docs/tutorial/security/first-steps.md
* 因此,为了与我们的 API 进行身份验证,它会发送一个 `Authorization` 请求头,值为 `Bearer ` 加上令牌。 * 如果令牌内容是 `foobar`,`Authorization` 请求头的内容就是:`Bearer foobar`。 ## **FastAPI** 的 `OAuth2PasswordBearer` { #fastapis-oauth2passwordbearer } **FastAPI** 在不同抽象层级提供了多种安全工具。 本示例将使用 **OAuth2** 的 **Password** 流程并配合 **Bearer** 令牌,通过 `OAuth2PasswordBearer` 类来实现。 /// info | 信息 “Bearer” 令牌并非唯一选项。 但它非常适合我们的用例。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 7.5K bytes - Click Count (0) -
tests/test_dependency_contextmanager.py
) tasks.add_task(bg, state) return state @app.middleware("http") async def middleware(request, call_next): response: StreamingResponse = await call_next(request) response.headers["x-state"] = json.dumps(state.copy()) return response client = TestClient(app) def test_async_state(): assert state["/async"] == "asyncgen not started" response = client.get("/async")Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 11.5K bytes - Click Count (0) -
tests/test_top_level_security_scheme_in_openapi.py
@app.get("/", dependencies=[Depends(bearer_scheme)]) async def get_root(): return {"message": "Hello, World!"} client = TestClient(app) def test_get_root(): response = client.get("/", headers={"Authorization": "Bearer token"}) assert response.status_code == 200, response.text assert response.json() == {"message": "Hello, World!"} def test_get_root_no_token(): response = client.get("/")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 1.9K bytes - Click Count (0) -
internal/ioutil/wait_pipe.go
w.done() }) return err } // PipeReader is similar to io.PipeReader with wait group type PipeReader struct { *io.PipeReader wait func() } // CloseWithError close with supplied error the reader end func (r *PipeReader) CloseWithError(err error) error { err = r.PipeReader.CloseWithError(err) r.wait() return err } // WaitPipe implements wait-group backend io.Pipe to provide
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Thu Apr 27 14:55:36 GMT 2023 - 1.7K bytes - Click Count (0) -
cmd/bitrot-streaming.go
}() return bw } // ReadAt() implementation which verifies the bitrot hash available as part of the stream. type streamingBitrotReader struct { disk StorageAPI data []byte rc io.Reader volume string filePath string tillOffset int64 currOffset int64 h hash.Hash shardSize int64 hashBytes []byte } func (b *streamingBitrotReader) Close() error {
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Jan 17 19:19:30 GMT 2025 - 6.2K bytes - Click Count (0) -
docs/uk/docs/tutorial/testing.md
* Щоб передати тіло JSON, передайте Python-об'єкт (наприклад, `dict`) у параметр `json`. * Якщо потрібно надіслати *Form Data* замість JSON, використовуйте параметр `data`. * Щоб передати заголовки *headers*, використовуйте `dict` у параметрі `headers`. * Для *cookies* використовуйте `dict` у параметрі `cookies`.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 8.6K bytes - Click Count (0) -
ci/official/containers/ml_build/setup.python.sh
$VERSION $VERSION-dev $VERSION-venv EOF else cat >pythons.txt <<EOF $VERSION $VERSION-dev $VERSION-venv $VERSION-distutils EOF fi /setup.packages.sh pythons.txt # Python 3.10 include headers fix: # sysconfig.get_path('include') incorrectly points to /usr/local/include/python # map /usr/include/python3.10 to /usr/local/include/python3.10 if [[ ! -f "/usr/local/include/$VERSION" ]]; then
Created: Tue Apr 07 12:39:13 GMT 2026 - Last Modified: Thu Oct 30 20:25:44 GMT 2025 - 2.5K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/suggest/index/SuggestIndexerErrorHandlingTest.java
QueryLogReader emptyReader = new QueryLogReader() { @Override public QueryLog read() { return null; // Empty reader } @Override public void close() { } }; CountDownLatch latch = new CountDownLatch(1);
Created: Fri Apr 17 09:08:13 GMT 2026 - Last Modified: Sat Mar 14 02:35:38 GMT 2026 - 18.7K bytes - Click Count (0) -
docs/fr/docs/tutorial/security/simple-oauth2.md
/// info L'en‑tête supplémentaire `WWW-Authenticate` avec la valeur `Bearer` que nous renvoyons ici fait également partie de la spécification. Il est prévu qu'un code d'état HTTP (d'erreur) 401 « UNAUTHORIZED » renvoie également un en‑tête `WWW-Authenticate`. Dans le cas des jetons bearer (notre cas), la valeur de cet en‑tête doit être `Bearer`.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 11.2K bytes - Click Count (0)