- Sort Score
- Num 10 results
- Language All
Results 141 - 150 of 657 for userHome (0.12 seconds)
-
tests/test_security_api_key_header_optional.py
from pydantic import BaseModel app = FastAPI() api_key = APIKeyHeader(name="key", auto_error=False) class User(BaseModel): username: str def get_current_user(oauth_header: str | None = Security(api_key)): if oauth_header is None: return None user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: User | None = Depends(get_current_user)):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.1K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/auth/chain/AuthenticationChain.java
void delete(User user); /** * Changes the password for the specified user. * @param username The username for which to change the password. * @param password The new password. * @return True if the password was successfully changed, false otherwise. */ boolean changePassword(String username, String password); /** * Loads user information from the authentication chain.
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Jul 17 08:28:31 GMT 2025 - 1.7K bytes - Click Count (0) -
docs/zh/docs/tutorial/request-forms.md
{* ../../docs_src/request_forms/tutorial001_an_py310.py hl[9] *} 例如,在 OAuth2 规范的一种使用方式(称为“密码流”)中,要求将 `username` 和 `password` 作为表单字段发送。 <dfn title="规范">规范</dfn>要求这些字段必须精确命名为 `username` 和 `password`,并且作为表单字段发送,而不是 JSON。 使用 `Form` 可以像使用 `Body`(以及 `Query`、`Path`、`Cookie`)一样声明相同的配置,包括校验、示例、别名(例如将 `username` 写成 `user-name`)等。 /// info `Form` 是直接继承自 `Body` 的类。 /// /// tipCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 2.5K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/app/web/admin/elevateword/AdminElevatewordAction.java
* * @param form create form containing elevate word data * @param username current user's username * @param currentTime current timestamp * @return optional ElevateWord entity */ public static OptionalEntity<ElevateWord> getEntity(final CreateForm form, final String username, final long currentTime) { switch (form.crudMode) { case CrudMode.CREATE:Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Fri Jan 23 23:57:26 GMT 2026 - 22.2K bytes - Click Count (0) -
docs/zh/docs/tutorial/extra-models.md
```Python UserInDB(**user_dict) ``` 就会生成如下结果: ```Python UserInDB( username="john", password="secret", email="******@****.***", full_name=None, ) ``` 或更精准,直接使用 `user_dict`(无论它将来包含什么字段): ```Python UserInDB( username = user_dict["username"], password = user_dict["password"], email = user_dict["email"], full_name = user_dict["full_name"], )Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 6.5K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Credentials.kt
object Credentials { /** Returns an auth credential for the Basic scheme. */ @JvmStatic @JvmOverloads fun basic( username: String, password: String, charset: Charset = ISO_8859_1, ): String { val usernameAndPassword = "$username:$password" val encoded = usernameAndPassword.encode(charset).base64() return "Basic $encoded" }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Dec 27 13:39:56 GMT 2024 - 1.1K bytes - Click Count (0) -
docs_src/configure_swagger_ui/tutorial001_py310.py
from fastapi import FastAPI app = FastAPI(swagger_ui_parameters={"syntaxHighlight": False}) @app.get("/users/{username}") async def read_user(username: str):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 205 bytes - Click Count (0) -
docs_src/configure_swagger_ui/tutorial003_py310.py
from fastapi import FastAPI app = FastAPI(swagger_ui_parameters={"deepLinking": False}) @app.get("/users/{username}") async def read_user(username: str):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 201 bytes - Click Count (0) -
docs_src/dependencies/tutorial008e_py310.py
app = FastAPI() def get_username(): try: yield "Rick" finally: print("Cleanup up before response is sent") @app.get("/users/me") def get_user_me(username: str = Depends(get_username, scope="function")):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 289 bytes - Click Count (0) -
tests/test_security_http_basic_optional.py
return {"msg": "Create an account first"} return {"username": credentials.username, "password": credentials.password} 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"}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.7K bytes - Click Count (0)