- Sort Score
- Result 10 results
- Languages All
Results 11 - 19 of 19 for HTTPBasic (0.21 sec)
-
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 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} client = TestClient(app)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.6K bytes - Viewed (0) -
docs_src/security/tutorial007_an.py
import secrets from fastapi import Depends, FastAPI, HTTPException, status from fastapi.security import HTTPBasic, HTTPBasicCredentials from typing_extensions import Annotated app = FastAPI() security = HTTPBasic() def get_current_username( credentials: Annotated[HTTPBasicCredentials, Depends(security)], ): current_username_bytes = credentials.username.encode("utf8") correct_username_bytes = b"stanleyjobson"
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial006_an.py
"summary": "Read Current User", "operationId": "read_current_user_users_me_get", "security": [{"HTTPBasic": []}], } } }, "components": { "securitySchemes": {"HTTPBasic": {"type": "http", "scheme": "basic"}} },
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.3K bytes - Viewed (0) -
fastapi/security/http.py
## Example ```python 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)]):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Apr 19 15:29:38 GMT 2024 - 13.2K bytes - Viewed (0) -
docs/de/docs/reference/security/index.md
Sie kรถnnen sie von `fastapi.security` importieren: ```python from fastapi.security import ( APIKeyCookie, APIKeyHeader, APIKeyQuery, HTTPAuthorizationCredentials, HTTPBasic, HTTPBasicCredentials, HTTPBearer, HTTPDigest, OAuth2, OAuth2AuthorizationCodeBearer, OAuth2PasswordBearer, OAuth2PasswordRequestForm, OAuth2PasswordRequestFormStrict,
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 18:15:05 GMT 2024 - 1.8K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial006.py
"summary": "Read Current User", "operationId": "read_current_user_users_me_get", "security": [{"HTTPBasic": []}], } } }, "components": { "securitySchemes": {"HTTPBasic": {"type": "http", "scheme": "basic"}} },
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.3K bytes - Viewed (0) -
docs/em/docs/advanced/security/http-basic-auth.md
& ๐จ ๐ `WWW-Authenticate` โฎ๏ธ ๐ฒ `Basic`, & ๐ฆ `realm` ๐ข. ๐ ๐ฌ ๐ฅ ๐ฆ ๐ ๏ธ ๐ ๐ & ๐. โคด๏ธ, ๐โ ๐ ๐ ๐ ๐ & ๐, ๐ฅ ๐จ ๐ซ ๐ ๐. ## ๐ ๐บ๐ธ๐ ๐ฐ ๐ * ๐ `HTTPBasic` & `HTTPBasicCredentials`. * โ "`security` โ" โ๏ธ `HTTPBasic`. * โ๏ธ ๐ `security` โฎ๏ธ ๐ ๐ *โก ๐ ๏ธ*. * โซ๏ธ ๐จ ๐ ๐ `HTTPBasicCredentials`: * โซ๏ธ ๐ `username` & `password` ๐จ. ```Python hl_lines="2 6 10"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 4.1K bytes - Viewed (0) -
docs/en/docs/advanced/security/http-basic-auth.md
Then, when you type that username and password, the browser sends them in the header automatically. ## 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.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 14:33:05 GMT 2024 - 5.9K bytes - Viewed (0) -
docs/de/docs/advanced/security/http-basic-auth.md
Wenn Sie dann den Benutzernamen und das Passwort eingeben, sendet der Browser diese automatisch im Header. ## Einfaches HTTP Basic Auth * Importieren Sie `HTTPBasic` und `HTTPBasicCredentials`. * Erstellen Sie mit `HTTPBasic` ein โ`security`-Schemaโ. * Verwenden Sie dieses `security` mit einer Abhรคngigkeit in Ihrer *Pfadoperation*. * Diese gibt ein Objekt vom Typ `HTTPBasicCredentials` zurรผck:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:28:08 GMT 2024 - 6.9K bytes - Viewed (0)