- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 145 for sectre (0.17 sec)
-
docs_src/dependencies/tutorial012_an_py39.py
from typing_extensions import Annotated async def verify_token(x_token: Annotated[str, Header()]): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def verify_key(x_key: Annotated[str, Header()]): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 756 bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 15.4K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial006_an_py39.py
"/items/", headers={"X-Token": "fake-super-secret-token", "X-Key": "invalid"} ) assert response.status_code == 400, response.text assert response.json() == {"detail": "X-Key header invalid"} @needs_py39 def test_get_valid_headers(client: TestClient): response = client.get( "/items/", headers={ "X-Token": "fake-super-secret-token", "X-Key": "fake-super-secret-key",
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 5.3K bytes - Viewed (0) -
tests/test_security_api_key_header_description.py
return current_user client = TestClient(app) def test_security_api_key(): response = client.get("/users/me", headers={"key": "secret"}) assert response.status_code == 200, response.text assert response.json() == {"username": "secret"} def test_security_api_key_no_key(): response = client.get("/users/me") assert response.status_code == 403, response.text
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2K bytes - Viewed (0) -
tests/test_tutorial/test_bigger_applications/test_main.py
"/items?token=jessica", headers={"X-Token": "fake-super-secret-token"} ) assert response.status_code == 200 assert response.json() == { "plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}, } def test_items_with_no_token_jessica(client: TestClient): response = client.get("/items", headers={"X-Token": "fake-super-secret-token"}) assert response.status_code == 422
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 24.6K bytes - Viewed (0) -
docs/en/data/external_links.yml
- author: John Philip author_link: https://medium.com/@amjohnphilip link: https://python.plainenglish.io/building-a-restful-api-with-fastapi-secure-signup-and-login-functionality-included-45cdbcb36106 title: "Building a RESTful API with FastAPI: Secure Signup and Login Functionality Included" - author: Keshav Malik author_link: https://theinfosecguy.xyz/
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 21 20:57:27 GMT 2024 - 21.3K bytes - Viewed (2) -
docs_src/bigger_applications/app/dependencies.py
from fastapi import Header, HTTPException async def get_token_header(x_token: str = Header()): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def get_query_token(token: str): if token != "jessica":
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 369 bytes - Viewed (0) -
docs/em/docs/tutorial/extra-models.md
```Python user_in = UserIn(username="john", password="secret", email="******@****.***") ``` & โคด๏ธ ๐ฅ ๐ค: ```Python user_dict = user_in.dict() ``` ๐ฅ ๐ โ๏ธ `dict` โฎ๏ธ ๐ฝ ๐ข `user_dict` (โซ๏ธ `dict` โฉ๏ธ Pydantic ๐ท ๐). & ๐ฅ ๐ฅ ๐ค: ```Python print(user_dict) ``` ๐ฅ ๐ ๐ค ๐ `dict` โฎ๏ธ: ```Python { 'username': 'john', 'password': 'secret', 'email': '******@****.***',
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 6.8K bytes - Viewed (0) -
docs/en/docs/advanced/security/http-basic-auth.md
```Python if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"): # Return some error ... ``` But by using the `secrets.compare_digest()` it will be secure against a type of attacks called "timing attacks". ### Timing Attacks But what's a "timing attack"? Let's imagine some attackers are trying to guess the username and password.
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/tutorial/security/oauth2-jwt.md
Melden Sie sich bei der Anwendung auf die gleiche Weise wie zuvor an. Verwenden Sie die Anmeldeinformationen: Benutzername: `johndoe` Passwort: `secret`. !!! check Beachten Sie, dass im Code nirgendwo das Klartext-Passwort "`secret`" steht, wir haben nur die gehashte Version. <img src="/img/tutorial/security/image08.png"> Rufen Sie den Endpunkt `/users/me/` auf, Sie erhalten die Response:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:27:06 GMT 2024 - 15.1K bytes - Viewed (0)