AuthHandler
AuthHandler provides a unified authentication layer supporting HTTP Basic Auth,
Bearer tokens, and API keys. It integrates with both FastAPI (as a dependency) and
Flask (as a decorator), and is used internally by the
mcp-gateway and agent
webhook endpoints.
Properties
security_config
A SecurityConfig
instance that provides the authentication credentials. The handler reads:
- Basic auth username/password from
get_basic_auth() - Bearer token from the
bearer_tokenattribute (if set) - API key and header name from the
api_keyandapi_key_headerattributes (if set)