
- Create user model and database connection - Set up Alembic migrations - Implement JWT token authentication - Add routes for registration, login, refresh, and user profile - Create health endpoint - Configure CORS - Update README with setup and usage instructions
17 lines
298 B
Python
17 lines
298 B
Python
from typing import Optional
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class Token(BaseModel):
|
|
access_token: str
|
|
refresh_token: str
|
|
token_type: str
|
|
|
|
|
|
class TokenPayload(BaseModel):
|
|
sub: Optional[str] = None
|
|
exp: Optional[int] = None
|
|
|
|
|
|
class RefreshToken(BaseModel):
|
|
refresh_token: str |