Hook that runs only for the route or route group where it is attached.
Route hooks are for scoped policy and context enrichment such as
authentication, tenant resolution, feature gates, and idempotency. They add
fields to the handler context instead of replacing the app context.
Hook additions must not include gate: the server re-attaches the gate
declared by the context blueprint after every hook, so identity changes are
picked up automatically.
Hook that runs only for the route or route group where it is attached.
Route hooks are for scoped policy and context enrichment such as authentication, tenant resolution, feature gates, and idempotency. They add fields to the handler context instead of replacing the app context.
Hook additions must not include
gate: the server re-attaches the gate declared by the context blueprint after every hook, so identity changes are picked up automatically.