Implement Phase 2: Refresh tokens, 2FA, password reset, and audit logging

Co-authored-by: mblanke <9078342+mblanke@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-09 17:30:12 +00:00
parent ddf287cde7
commit c8c0c762c5
15 changed files with 716 additions and 9 deletions

View File

@@ -0,0 +1,29 @@
from pydantic import BaseModel
from typing import Optional, Dict, Any
from datetime import datetime
class AuditLogBase(BaseModel):
"""Base audit log schema"""
action: str
resource_type: str
resource_id: Optional[int] = None
details: Optional[Dict[str, Any]] = None
class AuditLogCreate(AuditLogBase):
"""Schema for creating an audit log entry"""
pass
class AuditLogRead(AuditLogBase):
"""Schema for reading audit log data"""
id: int
user_id: Optional[int]
tenant_id: int
ip_address: Optional[str]
user_agent: Optional[str]
created_at: datetime
class Config:
from_attributes = True