- Archived 'aether_sql_tables' and 'legacy_router_logs' to documentation/archive/. - Static schema documentation is now superseded by the 'ae_obj_info' MCP tool and shared agents_sync metadata.
1.2 KiB
1.2 KiB
Router: dependencies_v3
File: app/routers/dependencies_v3.py
Routes found: 0
Functions: 2 — get_account_context_optional, get_account_context
Classes: 4 — PaginationParams, StatusFilterParams, SerializationParams, DelayParams
Routes
- (no @router. decorators found)
From-imports
-
app.models.auth_models
-
fastapi
-
typing
File preview (first 20 lines)
from fastapi import Depends, Header, HTTPException, Query, Response, status
from typing import Optional, Union
import logging
import asyncio
from app.models.auth_models import AccountContext
log = logging.getLogger(__name__)
# --- Account Context Dependencies ---
def get_account_context_optional(
x_account_id: Optional[str] = Header(None, min_length=11, max_length=22),
x_no_account_id: Optional[str] = Header(None, min_length=3, max_length=100),
x_no_account_id_token: Optional[str] = Query(None, alias='jwt', min_length=11),
x_aether_api_key: Optional[str] = Header(None, min_length=11, max_length=22),
) -> AccountContext:
"""
Resolves the account context and enforces API Key validation.
Uses DEFERRED imports to prevent circular dependency at startup.