Skip to main content

Module hooks

Module hooks 

Source
Expand description

Framework-agnostic extension points for embedding the proxy.

These traits let an embedding crate inject stateless service-specific logic (a forward-auth/PDP decision, an OIDC discovery/JWKS/userinfo backing, extra routes) without naming an HTTP framework in its own code or Cargo.toml. All signatures use the foundational http crate (already in the tree via both axum and tonic), bytes::Bytes, and serde_json::Value (never an axum type), so cargo tree -i axum in an embedder shows axum only under structured-proxy.

Stateful concerns (BFF sessions, OIDC authorize/token) are deliberately absent: the default build is a stateless data plane (see the crate README Non-goals). They are planned behind an opt-in bff feature.

Structs§

ExtraRoute
A single extra route: a method, a path, and the handler to run.
MetadataDocument
A static JSON document served at a fixed path (an OIDC metadata document or a JWKS document).
RequestParts
Borrowed view of an incoming request, passed to an AuthDecider.
RouteRequest
Owned view of a request handed to an ExtraRouteHandler.
RouteResponse
Response produced by an ExtraRouteHandler.

Enums§

Decision
The outcome of an AuthDecider evaluation.

Traits§

AuthDecider
The per-request authorization gate.
ExtraRouteHandler
A stateless handler for an extra route registered via ProxyServer::with_extra_routes.
OidcBackend
Backing for the stateless OIDC surface the proxy hosts.