| | |
| | | from urllib.parse import urlencode |
| | | |
| | | import jwt |
| | | from cryptography.fernet import Fernet |
| | | from fastapi import FastAPI, Depends, HTTPException |
| | | from fastapi.security import OAuth2PasswordBearer |
| | | from passlib.context import CryptContext |
| | |
| | | |
| | | from app.models.user_model import UserModel |
| | | from app.service.auth import SECRET_KEY, ALGORITHM |
| | | from app.config.config import settings |
| | | |
| | | app = FastAPI() |
| | | |
| | | pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") |
| | | oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") |
| | | cipher_suite = Fernet(settings.HASH_SUB_KEY) |
| | | |
| | | |
| | | class Response(BaseModel): |