- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for user1 (0.2 sec)
-
tests/test_security_oauth2.py
"tokenUrl": "token", "scopes": {"read:users": "Read the users", "write:users": "Create users"}, } } ) class User(BaseModel): username: str # Here we use string annotations to test them def get_current_user(oauth_header: "str" = Security(reusable_oauth2)): user = User(username=oauth_header) return user @app.post("/login")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 10.7K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/index.md
activate_user["/users/{user_id}/activate"] pro_items["/items/pro/"] current_user --> active_user active_user --> admin_user active_user --> paying_user current_user --> public active_user --> private admin_user --> activate_user paying_user --> pro_items ``` ## Integrated with **OpenAPI** All these dependencies, while declaring their requirements, also add parameters, validations, etc. to your *path operations*.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.6K bytes - Viewed (0) -
docs/zh/docs/advanced/security/oauth2-scopes.md
再次查看这个依赖项树与作用域。 `get_current_active_user` 依赖项包含子依赖项 `get_current_user`,并在 `get_current_active_user`中声明了作用域 `"me"` 包含所需作用域列表 ,在 `security_scopes.scopes` 中传递给 `get_current_user`。 *路径操作*自身也声明了作用域,`"items"`,这也是 `security_scopes.scopes` 列表传递给 `get_current_user` 的。 依赖项与作用域的层级架构如下: * *路径操作* `read_own_items` 包含: * 依赖项所需的作用域 `["items"]`: * `get_current_active_user`: * 依赖项函数 `get_current_active_user` 包含:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 22:43:35 GMT 2024 - 11.8K bytes - Viewed (0) -
docs/ko/docs/tutorial/dependencies/index.md
* `/items/public/` * `/items/private/` * `/users/{user_id}/activate` * `/items/pro/` 그 다음 각각에 대해 그저 의존성과 하위 의존성을 사용하여 다른 권한 요구 사항을 추가할 수 있을 겁니다: ```mermaid graph TB current_user(["current_user"]) active_user(["active_user"]) admin_user(["admin_user"]) paying_user(["paying_user"]) public["/items/public/"] private["/items/private/"] activate_user["/users/{user_id}/activate"] pro_items["/items/pro/"]
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 13.6K bytes - Viewed (0) -
docs/de/docs/advanced/security/oauth2-scopes.md
Und wenn Sie den Scope `me`, aber nicht den Scope `items` auswählen, können Sie auf `/users/me/` zugreifen, aber nicht auf `/users/me/items/`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:26:08 GMT 2024 - 22.8K bytes - Viewed (0) -
docs/ko/docs/tutorial/path-params.md
*경로 작동*을 만들때 고정 경로를 갖고 있는 상황들을 맞닥뜨릴 수 있습니다. `/users/me`처럼, 현재 사용자의 데이터를 가져온다고 합시다. 사용자 ID를 이용해 특정 사용자의 정보를 가져오는 경로 `/users/{user_id}`도 있습니다. *경로 작동*은 순차적으로 실행되기 때문에 `/users/{user_id}` 이전에 `/users/me`를 먼저 선언해야 합니다: ```Python hl_lines="6 11" {!../../../docs_src/path_params/tutorial003.py!} ``` 그렇지 않으면 `/users/{user_id}`는 `/users/me` 요청 또한 매개변수 `user_id`의 값이 `"me"`인 것으로 "생각하게" 됩니다. ## 사전정의 값
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.8K bytes - Viewed (0) -
docs/en/docs/help-fastapi.md
# Help FastAPI - Get Help Do you like **FastAPI**? Would you like to help FastAPI, other users, and the author? Or would you like to get help with **FastAPI**? There are very simple ways to help (several involve just one or two clicks). And there are several ways to get help too. ## Subscribe to the newsletter
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 13.7K bytes - Viewed (0) -
docs/ru/docs/tutorial/extra-models.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.6K bytes - Viewed (0) -
docs/pt/docs/features.md
# e obtenha suporte do editor dentro da função def main(user_id: str): return user_id # Um modelo do Pydantic class User(BaseModel): id: int name: str joined: date ``` Que então pode ser usado como: ```Python my_user: User = User(id=3, name="John Doe", joined="2018-07-19") second_user_data = { "id": 4, "name": "Mary", "joined": "2018-11-30", }
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 10.4K bytes - Viewed (0) -
docs/fr/docs/features.md
# et profitez de l'aide de votre IDE dans cette fonction def main(user_id: str): return user_id # Un modèle Pydantic class User(BaseModel): id: int name: str joined: date ``` Qui peuvent ensuite être utilisés comme cela: ```Python my_user: User = User(id=3, name="John Doe", joined="2018-07-19") second_user_data = { "id": 4, "name": "Mary", "joined": "2018-11-30", }
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.1K bytes - Viewed (0)