- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 107 for John (0.04 sec)
-
docs_src/security/tutorial002_py310.py
email: str | None = None full_name: str | None = None disabled: bool | None = None def fake_decode_token(token): return User( username=token + "fakedecoded", email="john@example.com", full_name="John Doe" ) async def get_current_user(token: str = Depends(oauth2_scheme)): user = fake_decode_token(token) return user @app.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 711 bytes - Viewed (0) -
docs_src/security/tutorial002_an_py310.py
email: str | None = None full_name: str | None = None disabled: bool | None = None def fake_decode_token(token): return User( username=token + "fakedecoded", email="john@example.com", full_name="John Doe" ) async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]): user = fake_decode_token(token) return user @app.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 761 bytes - Viewed (0) -
docs_src/security/tutorial002.py
full_name: Union[str, None] = None disabled: Union[bool, None] = None def fake_decode_token(token): return User( username=token + "fakedecoded", email="john@example.com", full_name="John Doe" ) async def get_current_user(token: str = Depends(oauth2_scheme)): user = fake_decode_token(token) return user @app.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 755 bytes - Viewed (0) -
docs_src/security/tutorial002_an.py
full_name: Union[str, None] = None disabled: Union[bool, None] = None def fake_decode_token(token): return User( username=token + "fakedecoded", email="john@example.com", full_name="John Doe" ) async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]): user = fake_decode_token(token) return user @app.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 815 bytes - Viewed (0) -
internal/s3select/json/testdata/6.json
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jun 01 21:59:40 UTC 2021 - 79 bytes - Viewed (0) -
docs_src/python_types/tutorial002.py
def get_full_name(first_name: str, last_name: str): full_name = first_name.title() + " " + last_name.title() return full_name
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 172 bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial006_an_py39.py
client = TestClient(app) return client @needs_py39 def test_security_http_basic(client: TestClient): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text assert response.json() == {"username": "john", "password": "secret"} @needs_py39 def test_security_http_basic_no_credentials(client: TestClient): response = client.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.5K bytes - Viewed (0) -
tests/test_security_http_basic_realm_description.py
client = TestClient(app) def test_security_http_basic(): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text assert response.json() == {"username": "john", "password": "secret"} def test_security_http_basic_no_credentials(): response = client.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.8K bytes - Viewed (0) -
docs_src/security/tutorial003_an.py
from pydantic import BaseModel from typing_extensions import Annotated fake_users_db = { "johndoe": { "username": "johndoe", "full_name": "John Doe", "email": "******@****.***", "hashed_password": "fakehashedsecret", "disabled": False, }, "alice": { "username": "alice", "full_name": "Alice Wonderson",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 2.5K bytes - Viewed (0) -
docs_src/security/tutorial003_an_py39.py
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm from pydantic import BaseModel fake_users_db = { "johndoe": { "username": "johndoe", "full_name": "John Doe", "email": "******@****.***", "hashed_password": "fakehashedsecret", "disabled": False, }, "alice": { "username": "alice", "full_name": "Alice Wonderson",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 2.5K bytes - Viewed (0)