
- Setup project structure with FastAPI - Create user models with SQLAlchemy - Implement JWT authentication - Create auth endpoints (register, login, me) - Add health endpoint - Generate Alembic migrations - Update documentation Generated with BackendIM... (backend.im)
17 lines
274 B
Python
17 lines
274 B
Python
from typing import Optional
|
|
|
|
from pydantic import BaseModel, EmailStr
|
|
|
|
|
|
class Login(BaseModel):
|
|
username: str
|
|
password: str
|
|
|
|
|
|
class TokenResponse(BaseModel):
|
|
access_token: str
|
|
token_type: str = "bearer"
|
|
|
|
|
|
class RefreshToken(BaseModel):
|
|
refresh_token: str |