Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 38 of 38 for UserInDB (0.17 sec)

  1. docs_src/security/tutorial005_an_py39.py

        scopes: List[str] = []
    
    
    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
    
    
    pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
    
    oauth2_scheme = OAuth2PasswordBearer(
        tokenUrl="token",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  2. docs_src/security/tutorial005_py39.py

        scopes: list[str] = []
    
    
    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
    
    
    pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
    
    oauth2_scheme = OAuth2PasswordBearer(
        tokenUrl="token",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  3. docs_src/security/tutorial005.py

        scopes: List[str] = []
    
    
    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
    
    
    pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
    
    oauth2_scheme = OAuth2PasswordBearer(
        tokenUrl="token",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  4. docs/ko/docs/tutorial/security/simple-oauth2.md

    === "파이썬 3.10 이상"
    
        ```Python hl_lines="78-81"
        {!> ../../../docs_src/security/tutorial003_py310.py!}
        ```
    
    #### `**user_dict`에 대해
    
    `UserInDB(**user_dict)`는 다음을 의미한다:
    
    *`user_dict`의 키와 값을 다음과 같은 키-값 인수로 직접 전달합니다:*
    
    ```Python
    UserInDB(
        username = user_dict["username"],
        email = user_dict["email"],
        full_name = user_dict["full_name"],
        disabled = user_dict["disabled"],
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 22:37:23 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/security/simple-oauth2.md

        ```Python hl_lines="80-83"
        {!> ../../../docs_src/security/tutorial003.py!}
        ```
    
    #### Über `**user_dict`
    
    `UserInDB(**user_dict)` bedeutet:
    
    *Übergib die Schlüssel und Werte des `user_dict` direkt als Schlüssel-Wert-Argumente, äquivalent zu:*
    
    ```Python
    UserInDB(
        username = user_dict["username"],
        email = user_dict["email"],
        full_name = user_dict["full_name"],
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:08:44 GMT 2024
    - 14.3K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/security/simple-oauth2.md

        ```Python hl_lines="80-83"
        {!> ../../../docs_src/security/tutorial003.py!}
        ```
    
    #### About `**user_dict`
    
    `UserInDB(**user_dict)` means:
    
    *Pass the keys and values of the `user_dict` directly as key-value arguments, equivalent to:*
    
    ```Python
    UserInDB(
        username = user_dict["username"],
        email = user_dict["email"],
        full_name = user_dict["full_name"],
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  7. docs/en/docs/release-notes.md

    potential security issue: as the returned object is passed directly to Pydantic, if the returned object was a subclass of the `response_model` (e.g. you return a `UserInDB` that inherits from `User` but contains extra fields, like `hashed_password`, and `User` is used in the `response_model`), it would still pass the validation (because `UserInDB` is a subclass of `User`) and the object would be returned as-is, including the `hashed_password`. To fix this, the declared `response_model` is cloned, if it...
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  8. fastapi/routing.py

                )
                # Create a clone of the field, so that a Pydantic submodel is not returned
                # as is just because it's an instance of a subclass of a more limited class
                # e.g. UserInDB (containing hashed_password) could be a subclass of User
                # that doesn't have the hashed_password. But because it's a subclass, it
                # would pass the validation and be returned as is.
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
Back to top