Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for Hash (0.24 sec)

  1. docs_src/security/tutorial004_py310.py

    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
        return pwd_context.verify(plain_password, hashed_password)
    
    
    def get_password_hash(password):
        return pwd_context.hash(password)
    
    
    def get_user(db, username: str):
        if username in db:
            user_dict = db[username]
            return UserInDB(**user_dict)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_security/test_tutorial005_an_py39.py

        assert verify_password("secret", fake_users_db["johndoe"]["hashed_password"])
    
    
    @needs_py39
    def test_get_password_hash():
        from docs_src.security.tutorial005_an_py39 import get_password_hash
    
        assert get_password_hash("secretalice")
    
    
    @needs_py39
    def test_create_access_token():
        from docs_src.security.tutorial005_an_py39 import create_access_token
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_security/test_tutorial005_py310.py

        assert verify_password("secret", fake_users_db["johndoe"]["hashed_password"])
    
    
    @needs_py310
    def test_get_password_hash():
        from docs_src.security.tutorial005_py310 import get_password_hash
    
        assert get_password_hash("secretalice")
    
    
    @needs_py310
    def test_create_access_token():
        from docs_src.security.tutorial005_py310 import create_access_token
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  4. docs_src/security/tutorial003.py

            "full_name": "Alice Wonderson",
            "email": "******@****.***",
            "hashed_password": "fakehashedsecret2",
            "disabled": True,
        },
    }
    
    app = FastAPI()
    
    
    def fake_hash_password(password: str):
        return "fakehashed" + password
    
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: Union[str, None] = None
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 2.4K bytes
    - Viewed (0)
  5. tests/test_response_model_as_return_annotation.py

        return DBUser(name="John", surname="Doe", password_hash="secret")
    
    
    @app.get("/response_model_list_of_model-no_annotation", response_model=List[User])
    def response_model_list_of_model_no_annotation():
        return [
            DBUser(name="John", surname="Doe", password_hash="secret"),
            DBUser(name="Jane", surname="Does", password_hash="secret2"),
        ]
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Aug 14 09:49:57 GMT 2023
    - 47.7K bytes
    - Viewed (0)
  6. docs_src/security/tutorial003_an.py

            "full_name": "Alice Wonderson",
            "email": "******@****.***",
            "hashed_password": "fakehashedsecret2",
            "disabled": True,
        },
    }
    
    app = FastAPI()
    
    
    def fake_hash_password(password: str):
        return "fakehashed" + password
    
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: Union[str, None] = None
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  7. docs_src/security/tutorial003_an_py310.py

            "full_name": "Alice Wonderson",
            "email": "******@****.***",
            "hashed_password": "fakehashedsecret2",
            "disabled": True,
        },
    }
    
    app = FastAPI()
    
    
    def fake_hash_password(password: str):
        return "fakehashed" + password
    
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: str | None = None
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  8. docs_src/security/tutorial003_py310.py

            "full_name": "Alice Wonderson",
            "email": "******@****.***",
            "hashed_password": "fakehashedsecret2",
            "disabled": True,
        },
    }
    
    app = FastAPI()
    
    
    def fake_hash_password(password: str):
        return "fakehashed" + password
    
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: str | None = None
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 2.4K bytes
    - Viewed (0)
  9. docs_src/security/tutorial005_py310.py

    )
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
        return pwd_context.verify(plain_password, hashed_password)
    
    
    def get_password_hash(password):
        return pwd_context.hash(password)
    
    
    def get_user(db, username: str):
        if username in db:
            user_dict = db[username]
            return UserInDB(**user_dict)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  10. docs_src/security/tutorial005_an_py310.py

    )
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
        return pwd_context.verify(plain_password, hashed_password)
    
    
    def get_password_hash(password):
        return pwd_context.hash(password)
    
    
    def get_user(db, username: str):
        if username in db:
            user_dict = db[username]
            return UserInDB(**user_dict)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.2K bytes
    - Viewed (0)
Back to top