- Patched request_jwt to strip privileged IDs when signing with public keys - Updated AccountContext and V3 dependencies to preserve JWT payloads for guests - Whitelisted Archive, Post, Event, and other core objects for public read access - Added 'default_qry_str' to Event searchable fields - Added test_e2e_jwt_guest_auth.py for security verification
15 lines
433 B
Python
15 lines
433 B
Python
from typing import Optional
|
|
from pydantic import BaseModel
|
|
|
|
# Zero-dependency auth models for V3
|
|
# Created 2026-01-07 to resolve circular dependencies in FastAPI startup
|
|
|
|
class AccountContext(BaseModel):
|
|
account_id: Optional[int]
|
|
account_id_random: Optional[str]
|
|
administrator: bool = False
|
|
manager: bool = False
|
|
super: bool = False
|
|
auth_method: str = 'legacy_header'
|
|
token_payload: Optional[dict] = None
|