- Sort Score
- Num 10 results
- Language All
Results 31 - 40 of 473 for bekler (0.27 seconds)
-
docs/zh/docs/tutorial/security/simple-oauth2.md
因此,在端点中,只有当用户存在、通过身份验证、且状态为激活时,才能获得该用户: {* ../../docs_src/security/tutorial003_an_py310.py hl[58:66,69:74,94] *} /// info | 信息 此处返回值为 `Bearer` 的响应头 `WWW-Authenticate` 也是规范的一部分。 任何 401“UNAUTHORIZED”HTTP(错误)状态码都应返回 `WWW-Authenticate` 响应头。 本例中,因为使用的是 Bearer Token,该响应头的值应为 `Bearer`。 实际上,忽略这个附加响应头,也不会有什么问题。 之所以在此提供这个附加响应头,是为了符合规范的要求。 说不定什么时候,就有工具用得上它,而且,开发者或用户也可能用得上。 这就是遵循标准的好处... ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 9K bytes - Click Count (0) -
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) -
docs/de/docs/tutorial/dependencies/index.md
All dies, während Sie Codeverdoppelung minimieren. ## Erste Schritte { #first-steps } Sehen wir uns ein sehr einfaches Beispiel an. Es ist so einfach, dass es vorerst nicht sehr nützlich ist. Aber so können wir uns besser auf die Funktionsweise des **Dependency Injection** Systems konzentrieren.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 11.3K bytes - Click Count (0) -
docs/tr/docs/deployment/fastapicloud.md
# FastAPI Cloud { #fastapi-cloud } FastAPI uygulamanızı [FastAPI Cloud](https://fastapicloud.com)'a **tek bir komutla** deploy edebilirsiniz. Henüz yapmadıysanız gidip bekleme listesine katılın. 🚀 ## Giriş Yapma { #login } Önceden bir **FastAPI Cloud** hesabınız olduğundan emin olun (sizi bekleme listesinden davet ettik 😉). Ardından giriş yapın: <div class="termy"> ```console $ fastapi login You are logged in to FastAPI Cloud 🚀Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 2.2K bytes - Click Count (0) -
docs/ko/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 | 정보Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 9.6K bytes - Click Count (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"})
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 2.5K bytes - Click Count (0) -
docs/de/docs/advanced/generate-clients.md
im Client-Code **reflektiert** wird. Und wenn Sie den Client **erstellen**, wird eine Fehlermeldung ausgegeben, wenn die verwendeten Daten **nicht übereinstimmen**. Sie würden also **viele Fehler sehr früh** im Entwicklungszyklus erkennen, anstatt darauf warten zu müssen, dass die Fehler Ihren Endbenutzern in der Produktion angezeigt werden, und dann zu versuchen, zu debuggen, wo das Problem liegt. ✨...
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 11.3K bytes - Click Count (0) -
docs/de/docs/async.md
### Ist Nebenläufigkeit besser als Parallelität? { #is-concurrency-better-than-parallelism } Nein! Das ist nicht die Moral der Geschichte.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 27.3K bytes - Click Count (0) -
tests/test_security_http_bearer.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")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 2.3K bytes - Click Count (0)