auth_middleware
auth_middleware
¶
API key authentication middleware for the OpenJarvis server.
Classes¶
AuthMiddleware
¶
Bases: BaseHTTPMiddleware
Validates Authorization: Bearer <key> on /v1/* routes.
Webhook routes and health checks are exempt — they use per-channel signature verification instead.
Source code in src/openjarvis/server/auth_middleware.py
Functions¶
generate_api_key
¶
check_bind_safety
¶
Refuse to bind non-loopback without an API key.
Raises SystemExit if host is not a loopback address and
api_key is empty.