(authorization: str = Header(default=None))
| 91 | |
| 92 | |
| 93 | def get_admin_session(authorization: str = Header(default=None)) -> dict: |
| 94 | token = _extract_bearer_token(authorization) |
| 95 | payload = _require_admin_payload(authorization) |
| 96 | return { |
| 97 | "id": "admin", |
| 98 | "username": "admin", |
| 99 | "token": token, |
| 100 | "token_type": "Bearer", |
| 101 | "expires_at": payload.get("exp"), |
| 102 | } |
| 103 | |
| 104 | |
| 105 | ADMIN_PUBLIC_ENDPOINTS = {("POST", "/admin/login")} |
nothing calls this directly
no test coverage detected