Skip to content

Interface: GatewayClearanceContext

Defined in: packages/core/src/handoff/middleware.ts:41

Properties injected into the handler context by requireGatewayClearance.

Merge with your own context type via intersection:

typescript
type AppContext = BaseContext & GatewayClearanceContext;

Properties

handoffScope

ts
handoffScope: string;

Defined in: packages/core/src/handoff/middleware.ts:45

Delegation scope — the sub claim of the token (e.g. 'finance').


handoffState

ts
handoffState: Record<string, unknown>;

Defined in: packages/core/src/handoff/middleware.ts:43

Carry-over state from the gateway (inline or hydrated via Claim-Check).


handoffTid

ts
handoffTid: string;

Defined in: packages/core/src/handoff/middleware.ts:47

Transaction ID for distributed tracing (correlates with gateway spans).


handoffTraceparent?

ts
optional handoffTraceparent: string;

Defined in: packages/core/src/handoff/middleware.ts:49

W3C traceparent header, if present in the token.