/**
 * @template T
 * @typedef {import("@compas/stdlib").Either<T, AppError>} 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("../index.js").Postgres} sql
 * @param {import("koa").Context} ctx
 * @param {SessionTransportSettings} settings
 * @returns {Promise<Either<{session:
 *   import("./generated/common/types.d.ts").QueryResultStoreSessionStore}>>}
 */
export function sessionTransportLoadFromContext(event: import("@compas/stdlib").InsightEvent, sql: import("../index.js").Postgres, ctx: import("koa").Context, settings: SessionTransportSettings): Promise<Either<{
    session: import("./generated/common/types.d.ts").QueryResultStoreSessionStore;
}>>;
/**
 *
 * @param {SessionTransportSettings} opts
 * @returns {SessionTransportSettings}
 */
export function validateSessionTransportSettings(opts: SessionTransportSettings): SessionTransportSettings;
export type Either<T> = import("@compas/stdlib").Either<T, AppError>;
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";
