- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 465 for userHome (0.05 sec)
-
docs_src/security/tutorial003_an_py39.py
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") class User(BaseModel): username: str email: Union[str, None] = None full_name: Union[str, None] = None disabled: Union[bool, None] = None class UserInDB(User): hashed_password: str def get_user(db, username: str): if username in db: user_dict = db[username] return UserInDB(**user_dict) def fake_decode_token(token):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 2.5K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial001.py
def test_post_body_form(client: TestClient): response = client.post("/login/", data={"username": "Foo", "password": "secret"}) assert response.status_code == 200 assert response.json() == {"username": "Foo", "password": "secret"} def test_post_body_form_no_password(client: TestClient): response = client.post("/login/", data={"username": "Foo"}) assert response.status_code == 422 assert response.json() == {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 5.7K bytes - Viewed (0) -
docs_src/security/tutorial004_an_py310.py
payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM]) username = payload.get("sub") if username is None: raise credentials_exception token_data = TokenData(username=username) except InvalidTokenError: raise credentials_exception user = get_user(fake_users_db, username=token_data.username) if user is None: raise credentials_exception return user
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Sep 29 02:57:38 UTC 2025 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial002.py
def test_post_body_form(client: TestClient): response = client.post("/login/", data={"username": "Foo", "password": "secret"}) assert response.status_code == 200 assert response.json() == {"username": "Foo", "password": "secret"} def test_post_body_extra_form(client: TestClient): response = client.post( "/login/", data={"username": "Foo", "password": "secret", "extra": "extra"} ) assert response.status_code == 422
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 6.2K bytes - Viewed (0) -
docs_src/security/tutorial003_py39.py
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") class User(BaseModel): username: str email: Union[str, None] = None full_name: Union[str, None] = None disabled: Union[bool, None] = None class UserInDB(User): hashed_password: str def get_user(db, username: str): if username in db: user_dict = db[username] return UserInDB(**user_dict) def fake_decode_token(token):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2.4K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms/test_tutorial001.py
def test_post_body_form(client: TestClient): response = client.post("/login/", data={"username": "Foo", "password": "secret"}) assert response.status_code == 200 assert response.json() == {"username": "Foo"} def test_post_body_form_no_password(client: TestClient): response = client.post("/login/", data={"username": "Foo"}) assert response.status_code == 422 assert response.json() == { "detail": [
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 5.7K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/client/smb/SmbAuthentication.java
} /** * Returns the username for SMB authentication. * @return the username */ public String getUsername() { return username; } /** * Sets the username for SMB authentication. * @param username the username to set */ public void setUsername(final String username) { this.username = username; } /**Registered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Sun Jul 06 02:13:03 UTC 2025 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003.py
assert response.json() == {"detail": "Incorrect username or password"} def test_login_incorrect_username(client: TestClient): response = client.post("/token", data={"username": "foo", "password": "secret"}) assert response.status_code == 400, response.text assert response.json() == {"detail": "Incorrect username or password"} def test_no_token(client: TestClient): response = client.get("/users/me")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 7.7K bytes - Viewed (0) -
tests/test_schema_compat_pydantic_v2.py
class User(BaseModel): username: str role: PlatformRole | OtherRole @app.get("/users") async def get_user() -> User: return {"username": "alice", "role": "admin"} client = TestClient(app) return client @needs_py310 def test_get(client: TestClient): response = client.get("/users") assert response.json() == {"username": "alice", "role": "admin"}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 2.7K bytes - Viewed (0) -
tests/test_forms_single_param.py
from fastapi import FastAPI, Form from fastapi.testclient import TestClient app = FastAPI() @app.post("/form/") def post_form(username: Annotated[str, Form()]): return username client = TestClient(app) def test_single_form_field(): response = client.post("/form/", data={"username": "Rick"}) assert response.status_code == 200, response.text assert response.json() == "Rick"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 3.5K bytes - Viewed (0)