Skip to content

solutions_backend.api.dependencies

FastAPI dependencies for runtime access and constant-time bearer admission.

Functions

authenticated_runtime

authenticated_runtime(runtime: Annotated[BackendRuntime, Depends(runtime_from_request)], credentials: Annotated[HTTPAuthorizationCredentials | None, Depends(_bearer)]) -> BackendRuntime

Admit only the configured internal bearer without leaking comparison detail.

runtime_from_request

runtime_from_request(request: Request) -> BackendRuntime

Return the lifespan runtime or fail closed while the service is unready.