- Sort Score
- Num 10 results
- Language All
Results 51 - 55 of 55 for get_current_user (0.12 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs/pt/docs/tutorial/security/oauth2-jwt.md
Crie uma função utilitária para gerar um novo token de acesso. {* ../../docs_src/security/tutorial004_an_py310.py hl[4,7,13:15,29:31,79:87] *} ## Atualize as dependências { #update-the-dependencies } Atualize `get_current_user` para receber o mesmo token de antes, mas desta vez, usando tokens JWT. Decodifique o token recebido, verifique-o e retorne o usuário atual. Se o token for inválido, retorne um erro HTTP imediatamente.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Nov 12 16:23:57 GMT 2025 - 11.4K bytes - Click Count (0) -
docs/en/docs/tutorial/security/oauth2-jwt.md
Create a utility function to generate a new access token. {* ../../docs_src/security/tutorial004_an_py310.py hl[4,7,13:15,29:31,79:87] *} ## Update the dependencies { #update-the-dependencies } Update `get_current_user` to receive the same token as before, but this time, using JWT tokens. Decode the received token, verify it, and return the current user. If the token is invalid, return an HTTP error right away.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 02:57:38 GMT 2025 - 10.6K bytes - Click Count (0) -
docs/zh/docs/tutorial/security/oauth2-jwt.md
创建设置令牌过期时间的变量。 定义令牌端点响应的 Pydantic 模型。 创建生成新的访问令牌的工具函数。 {* ../../docs_src/security/tutorial004.py hl[6,12:14,28:30,78:86] *} ## 更新依赖项 更新 `get_current_user` 以接收与之前相同的令牌,但这里用的是 JWT 令牌。 解码并校验接收到的令牌,然后,返回当前用户。 如果令牌无效,则直接返回 HTTP 错误。 {* ../../docs_src/security/tutorial004_an_py310.py hl[4,7,13:15,29:31,79:87] *} ## 更新 `/token` *路径操作*Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 18 02:25:44 GMT 2024 - 8.9K bytes - Click Count (0) -
docs/ko/docs/tutorial/security/oauth2-jwt.md
응답을 위한 토큰 엔드포인트에 사용될 Pydantic 모델을 정의합니다. 새 액세스 토큰을 생성하기 위한 유틸리티 함수를 생성합니다. {* ../../docs_src/security/tutorial004_an_py310.py hl[4,7,13:15,29:31,79:87] *} ## 의존성 수정 `get_current_user` 함수를 이전과 동일한 토큰을 받도록 수정하되, 이번에는 JWT 토큰을 사용하도록 합니다. 받은 토큰을 디코딩하여 검증한 후 현재 사용자를 반환합니다. 토큰이 유효하지 않다면 HTTP 오류를 반환합니다. {* ../../docs_src/security/tutorial004_an_py310.py hl[90:107] *}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Aug 31 10:49:48 GMT 2025 - 12.2K bytes - Click Count (0) -
docs/ja/docs/tutorial/security/oauth2-jwt.md
レスポンスのトークンエンドポイントで使用するPydanticモデルを定義します。 新しいアクセストークンを生成するユーティリティ関数を作成します。 {* ../../docs_src/security/tutorial004.py hl[6,12:14,28:30,78:86] *} ## 依存関係の更新 `get_current_user`を更新して、先ほどと同じトークンを受け取るようにしますが、今回はJWTトークンを使用します。 受け取ったトークンを復号して検証し、現在のユーザーを返します。 トークンが無効な場合は、すぐにHTTPエラーを返します。 {* ../../docs_src/security/tutorial004.py hl[89:106] *} ## `/token` パスオペレーションの更新Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Aug 31 10:49:48 GMT 2025 - 14K bytes - Click Count (1)