Automated Action 8fefbb7c13 Add user authentication to the Todo app
- Created User model and schemas
- Implemented secure password hashing with bcrypt
- Added JWT token-based authentication
- Created user registration and login endpoints
- Added authentication to todo routes
- Updated todos to be associated with users
- Created migration script for the user table
- Updated documentation with auth information
2025-05-19 13:45:22 +00:00

17 lines
264 B
Python

from typing import Optional
from pydantic import BaseModel
class Token(BaseModel):
"""Schema for token response"""
access_token: str
token_type: str
class TokenPayload(BaseModel):
"""Schema for token payload"""
sub: Optional[int] = None