auth/request_context.ts view source
(deps: QueryDeps, account_id: string): Promise<RequestContext | null> Build a full RequestContext from an account id.
Shared helper used by session, bearer, and daemon token middleware,
as well as WebSocket upgrade handlers. Does the account → actor → permits
lookup pipeline and returns the composed context, or null if
the account or actor is not found.
deps
query dependencies
account_id
the account to build context for
stringreturns
Promise<RequestContext | null> a request context, or null if account/actor not found