import os from fastapi.security import OAuth2PasswordBearer from passlib.context import CryptContext ACCESS_TOKEN_EXPIRE_MINUTES = 60 * 24 * 7 # 7 days SECRET_KEY = os.getenv("SECRET_KEY") USERNAME = os.getenv("USERNAME") PASS_HASH = os.getenv("PASS_HASH") ALGORITHM = "HS256" fake_users_db = { "francois": { "username": f"{USERNAME}", "hashed_password": f"{PASS_HASH}", "disabled": False, } } pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")