- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 51 for johndoe (0.04 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
tests/test_response_model_data_filter_no_inheritance.py
response = client.post( "/users", json={"email": "johndoe@example.com", "password": "secret"} ) assert response.json() == {"email": "johndoe@example.com"} def test_filter_second_level_model(): response = client.get("/pets/1") assert response.json() == { "name": "Nibbler", "owner": {"email": "johndoe@example.com"}, } def test_list_of_models():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.7K bytes - Click Count (0) -
tests/test_response_model_data_filter.py
response = client.post( "/users", json={"email": "johndoe@example.com", "password": "secret"} ) assert response.json() == {"email": "johndoe@example.com"} def test_filter_second_level_model(): response = client.get("/pets/1") assert response.json() == { "name": "Nibbler", "owner": {"email": "johndoe@example.com"}, } def test_list_of_models():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.7K bytes - Click Count (0) -
docs/ko/docs/advanced/security/http-basic-auth.md
### 타이밍 공격 { #timing-attacks } 그렇다면 "timing attack"이란 무엇일까요? 공격자들이 사용자명과 비밀번호를 추측하려고 한다고 가정해봅시다. 그리고 사용자명 `johndoe`, 비밀번호 `love123`으로 요청을 보냅니다. 그러면 애플리케이션의 Python 코드는 대략 다음과 같을 것입니다: ```Python if "johndoe" == "stanleyjobson" and "love123" == "swordfish": ... ```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) -
tests/test_security_oauth2_optional.py
def test_strict_login_correct_data(): response = client.post( "/login", data={"username": "johndoe", "password": "secret", "grant_type": "password"}, ) assert response.status_code == 200 assert response.json() == { "grant_type": "password", "username": "johndoe", "password": "secret", "scopes": [], "client_id": None, "client_secret": None,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 9.8K bytes - Click Count (0) -
docs_src/security/tutorial003_py310.py
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm from pydantic import BaseModel fake_users_db = { "johndoe": { "username": "johndoe", "full_name": "John Doe", "email": "johndoe@example.com", "hashed_password": "fakehashedsecret", "disabled": False, }, "alice": { "username": "alice",Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2.4K bytes - Click Count (0) -
docs_src/security/tutorial004_an_py310.py
SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7" ALGORITHM = "HS256" ACCESS_TOKEN_EXPIRE_MINUTES = 30 fake_users_db = { "johndoe": { "username": "johndoe", "full_name": "John Doe", "email": "johndoe@example.com", "hashed_password": "$argon2id$v=19$m=65536,t=3,p=4$wagCPXjifgvUFBzq4hqe3w$CYaIb8sB+wtD+Vu/P4uod1+Qof8h+1g7bbDlBID48Rc", "disabled": False, } }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 18:10:35 GMT 2026 - 4.2K bytes - Click Count (0) -
docs_src/security/tutorial003_an_py310.py
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm from pydantic import BaseModel fake_users_db = { "johndoe": { "username": "johndoe", "full_name": "John Doe", "email": "johndoe@example.com", "hashed_password": "fakehashedsecret", "disabled": False, }, "alice": { "username": "alice",Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2.5K bytes - Click Count (0) -
docs/zh/docs/advanced/security/http-basic-auth.md
但使用 `secrets.compare_digest()`,可以防御**时差攻击**,更加安全。 ### 时差攻击 { #timing-attacks } 什么是**时差攻击**? 假设攻击者试图猜出用户名与密码。 他们发送用户名为 `johndoe`,密码为 `love123` 的请求。 然后,Python 代码执行如下操作: ```Python if "johndoe" == "stanleyjobson" and "love123" == "swordfish": ... ``` 但就在 Python 比较完 `johndoe` 的第一个字母 `j` 与 `stanleyjobson` 的 `s` 时,Python 就已经知道这两个字符串不相同了,它会这么想,**没必要浪费更多时间执行剩余字母的对比计算了**。应用立刻就会返回**错误的用户或密码**。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 4.4K bytes - Click Count (0) -
docs/en/docs/advanced/security/http-basic-auth.md
And they send a request with a username `johndoe` and a password `love123`. Then the Python code in your application would be equivalent to something like: ```Python if "johndoe" == "stanleyjobson" and "love123" == "swordfish": ... ```
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/zh-hant/docs/advanced/security/http-basic-auth.md
### 計時攻擊 { #timing-attacks } 什麼是「計時攻擊」呢? 想像有攻擊者在嘗試猜測使用者名稱與密碼。 他們送出一個帶有使用者名稱 `johndoe` 與密碼 `love123` 的請求。 接著,你的應用程式中的 Python 程式碼等同於: ```Python if "johndoe" == "stanleyjobson" and "love123" == "swordfish": ... ``` 當 Python 比較 `johndoe` 的第一個 `j` 與 `stanleyjobson` 的第一個 `s` 時,會立刻回傳 `False`,因為已經知道兩個字串不同,覺得「沒必要浪費計算資源繼續比較剩下的字元」。你的應用程式便會回應「Incorrect username or password」。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 4.7K bytes - Click Count (0)