
- 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
17 lines
264 B
Python
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
|