Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 29 of 29 for get_current_user (0.07 sec)

  1. docs/es/docs/tutorial/security/oauth2-jwt.md

    Crea una función de utilidad para generar un nuevo token de acceso.
    
    {* ../../docs_src/security/tutorial004_an_py310.py hl[4,7,13:15,29:31,79:87] *}
    
    ## Actualizar las dependencias
    
    Actualiza `get_current_user` para recibir el mismo token que antes, pero esta vez, usando tokens JWT.
    
    Decodifica el token recibido, verifícalo y devuelve el usuario actual.
    
    Si el token es inválido, devuelve un error HTTP de inmediato.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  2. docs/pt/docs/tutorial/security/simple-oauth2.md

    Agora vamos atualizar nossas dependências.
    
    Queremos obter o `user_user` *somente* se este usuário estiver ativo.
    
    Portanto, criamos uma dependência adicional `get_current_active_user` que por sua vez usa `get_current_user` como dependência.
    
    Ambas as dependências retornarão apenas um erro HTTP se o usuário não existir ou se estiver inativo.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 10K bytes
    - Viewed (0)
  3. docs/ko/docs/tutorial/security/simple-oauth2.md

    사양을 준수하기 위해 스스로 올바르게 수행하기 위해 거의 유일하게 기억해야 하는 것입니다.
    
    나머지는 **FastAPI**가 처리합니다.
    
    ///
    
    ## 의존성 업데이트하기
    
    이제 의존성을 업데이트를 할 겁니다.
    
    이 사용자가 활성화되어 있는 *경우에만* `current_user`를 가져올 겁니다.
    
    따라서 `get_current_user`를 의존성으로 사용하는 추가 종속성 `get_current_active_user`를 만듭니다.
    
    이러한 의존성 모두, 사용자가 존재하지 않거나 비활성인 경우 HTTP 오류를 반환합니다.
    
    따라서 엔드포인트에서는 사용자가 존재하고 올바르게 인증되었으며 활성 상태인 경우에만 사용자를 얻습니다:
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sat Feb 15 11:19:12 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/security/oauth2-jwt.md

    Создайте служебную функцию для генерации нового токена доступа.
    
    {* ../../docs_src/security/tutorial004_an_py310.py hl[4,7,13:15,29:31,79:87] *}
    
    ## Обновление зависимостей
    
    Обновите `get_current_user` для получения того же токена, что и раньше, но на этот раз с использованием JWT-токенов.
    
    Декодируйте полученный токен, проверьте его и верните текущего пользователя.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 18.5K bytes
    - Viewed (0)
  5. 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.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  6. 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
    
    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.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 11K bytes
    - Viewed (0)
  7. 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] *}
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 12.2K bytes
    - Viewed (0)
  8. 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` パスオペレーションの更新
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 14K bytes
    - Viewed (1)
  9. docs/en/docs/release-notes.md

    For example, you could have code like this:
    
    ```Python
    def get_current_user(token: str):
        # authenticate user
        return User()
    
    
    @app.get("/items/")
    def read_items(user: User = Depends(get_current_user)):
        ...
    
    
    @app.post("/items/")
    def create_item(*, user: User = Depends(get_current_user), item: Item):
        ...
    
    
    @app.get("/items/{item_id}")
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Fri Sep 05 12:48:45 UTC 2025
    - 544.1K bytes
    - Viewed (0)
Back to top