← Files Soprano ConnectARCHIVED FILE
src/mems_mcp/auth/base.py
714 Bytes · Dec 5, 2026 · 01:22 UTC
from __future__ import annotations
from typing import Protocol
import httpx
class AuthStrategy(Protocol):
"""Produces the HTTP headers needed to authenticate a Connect API request.
Each call may perform its own token exchange with Soprano. No token
caching is performed across calls: credentials are supplied per-request
by the MCP client and the server is stateless (see
docs/mcp-server-implementation-plan.md, "Token caching"). The one
deliberate, opt-in exception is `oauth_server.Layer2FallbackAuth`, used
only when `MCP_OAUTH_LAYER2_FALLBACK` is enabled.
"""
async def get_auth_headers(self, *, domain_url: str, http_client: httpx.AsyncClient) -> dict[str, str]: ...
SHA-256: 314cbf81034b9ec4a3f31e3dc4f3bcd7227e402ae0117fa6adbe3f6eb969f739