Automated Action 4e361e2d61 Add user authentication and user-specific invoice management
- Create User model and database schema
- Add JWT authentication with secure password hashing
- Create authentication endpoints for registration and login
- Update invoice routes to require authentication
- Ensure users can only access their own invoices
- Update documentation in README.md
2025-05-30 09:00:26 +00:00

19 lines
326 B
Python

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