/** * @template T * @typedef {import("@compas/stdlib").Either} Either */ /** * @typedef {object} SessionTransportSettings * @property {import("./session-store.js").SessionStoreSettings} sessionStoreSettings JWT * generation settings * @property {boolean} [enableHeaderTransport] Defaults to true, can be used to disable * reading the `Authorization` header * @property {object} [headerOptions] Object containing options to configure reading from * the 'Authorization' header. */ /** * Load the session from the authorization header. * * @param {import("@compas/stdlib").InsightEvent} event * @param {import("postgres").Sql<{}>} sql * @param {import("koa").Context} ctx * @param {SessionTransportSettings} settings * @returns {Promise>} */ export function sessionTransportLoadFromContext(event: import("@compas/stdlib").InsightEvent, sql: import("postgres").Sql<{}>, ctx: import("koa").Context, settings: SessionTransportSettings): Promise>; /** * * @param {SessionTransportSettings} opts * @returns {SessionTransportSettings} */ export function validateSessionTransportSettings(opts: SessionTransportSettings): SessionTransportSettings; export type Either = import("@compas/stdlib").Either; export type SessionTransportSettings = { /** * JWT * generation settings */ sessionStoreSettings: import("./session-store.js").SessionStoreSettings; /** * Defaults to true, can be used to disable * reading the `Authorization` header */ enableHeaderTransport?: boolean | undefined; /** * Object containing options to configure reading from * the 'Authorization' header. */ headerOptions?: object; }; import { AppError } from "@compas/stdlib";