- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 16 for HTTPBasicCredentials (0.38 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/security/tutorial006_an_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 361 bytes - Click Count (0) -
docs_src/security/tutorial006_py310.py
from fastapi import Depends, FastAPI from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI() security = HTTPBasic() @app.get("/users/me") def read_current_user(credentials: HTTPBasicCredentials = Depends(security)):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 321 bytes - Click Count (0) -
tests/test_security_http_basic_realm_description.py
from fastapi import FastAPI, Security from fastapi.security import HTTPBasic, HTTPBasicCredentials from fastapi.testclient import TestClient from inline_snapshot import snapshot app = FastAPI() security = HTTPBasic(realm="simple", description="HTTPBasic scheme") @app.get("/users/me") def read_current_user(credentials: HTTPBasicCredentials = Security(security)):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 2.9K bytes - Click Count (0) -
fastapi/security/http.py
from typing import Annotated from fastapi import Depends, FastAPI from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI() security = HTTPBasic() @app.get("/users/me") def read_current_user(credentials: Annotated[HTTPBasicCredentials, Depends(security)]): return {"username": credentials.username, "password": credentials.password} ``` """Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Mar 16 10:16:48 GMT 2026 - 13.1K bytes - Click Count (0) -
tests/test_security_http_basic_realm.py
from base64 import b64encode from fastapi import FastAPI, Security from fastapi.security import HTTPBasic, HTTPBasicCredentials from fastapi.testclient import TestClient from inline_snapshot import snapshot app = FastAPI() security = HTTPBasic(realm="simple") @app.get("/users/me") def read_current_user(credentials: HTTPBasicCredentials = Security(security)): return {"username": credentials.username, "password": credentials.password}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 2.7K bytes - Click Count (0) -
tests/test_security_http_basic_optional.py
from base64 import b64encode from fastapi import FastAPI, Security from fastapi.security import HTTPBasic, HTTPBasicCredentials from fastapi.testclient import TestClient from inline_snapshot import snapshot app = FastAPI() security = HTTPBasic(auto_error=False) @app.get("/users/me") def read_current_user(credentials: HTTPBasicCredentials | None = Security(security)): if credentials is None:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.7K bytes - Click Count (0) -
docs/en/docs/advanced/security/http-basic-auth.md
## Simple HTTP Basic Auth { #simple-http-basic-auth } * Import `HTTPBasic` and `HTTPBasicCredentials`. * Create a "`security` scheme" using `HTTPBasic`. * Use that `security` with a dependency in your *path operation*. * It returns an object of type `HTTPBasicCredentials`: * It contains the `username` and `password` sent. {* ../../docs_src/security/tutorial006_an_py310.py hl[4,8,12] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 5K bytes - Click Count (0) -
docs/ko/docs/advanced/security/http-basic-auth.md
그다음 사용자명과 비밀번호를 입력하면, 브라우저가 자동으로 해당 값을 헤더에 담아 전송합니다. ## 간단한 HTTP Basic Auth { #simple-http-basic-auth } * `HTTPBasic`과 `HTTPBasicCredentials`를 임포트합니다. * `HTTPBasic`을 사용해 "`security` scheme"을 생성합니다. * *경로 처리*에서 dependency로 해당 `security`를 사용합니다. * `HTTPBasicCredentials` 타입의 객체를 반환합니다: * 전송된 `username`과 `password`를 포함합니다. {* ../../docs_src/security/tutorial006_an_py310.py hl[4,8,12] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 5.9K bytes - Click Count (0) -
docs/ja/docs/advanced/security/http-basic-auth.md
その後、そのユーザー名とパスワードを入力すると、ブラウザはそれらをヘッダーに自動的に付与して送信します。 ## シンプルな HTTP Basic 認証 { #simple-http-basic-auth } - `HTTPBasic` と `HTTPBasicCredentials` をインポートします。 - `HTTPBasic` を使って「`security` スキーム」を作成します。 - その `security` を依存関係として path operation に使用します。 - `HTTPBasicCredentials` 型のオブジェクトが返ります: - 送信された `username` と `password` を含みます。 {* ../../docs_src/security/tutorial006_an_py310.py hl[4,8,12] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 6.4K bytes - Click Count (0) -
docs/ru/docs/advanced/security/http-basic-auth.md
## Простой HTTP Basic Auth { #simple-http-basic-auth } * Импортируйте `HTTPBasic` и `HTTPBasicCredentials`. * Создайте «схему» `security` с помощью `HTTPBasic`. * Используйте эту `security` как зависимость в вашей *операции пути*. * Она возвращает объект типа `HTTPBasicCredentials`: * Он содержит отправленные `username` и `password`. {* ../../docs_src/security/tutorial006_an_py310.py hl[4,8,12] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 7.4K bytes - Click Count (0)