Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/client / / TransportAuth

Type Alias: TransportAuth

ts
type TransportAuth = 
  | {
  kind: "bearer";
  token: string;
}
  | {
  kind: "ticket";
  ticketProvider: () => Promise<string>;
};

Defined in: packages/client/src/transport/types.ts:45

Authentication strategy passed to a transport. The bearer-token shape is consumed by both transports (WS via the Authorization header on Node SDK clients; SSE via the Authorization header on every fetch); the ticket-provider shape is only used by the WS browser path (the WebSocket browser API does not allow custom headers, so the ticket rides the Sec-WebSocket-Protocol header).

Stable