///
import { Session, SessionData } from 'express-session';
import { IncomingMessage, ServerResponse } from 'http';
import { SSXRequestObject } from '../express/middleware';
import { SSXServerRoutes } from '@spruceid/ssx-core';
import { SSXServerBaseClass } from '@spruceid/ssx-core/server';
declare module 'http' {
interface IncomingMessage {
sessionID: string;
ssx: SSXRequestObject & Omit, 'log'>;
session: Session & Partial;
}
}
/**
* This middleware function does the following:
* 1. Checks for a ssx-session cookie and if it exists, it will manage and set the session on the request object.
* 2. Adds a ssx field to the request object with SSX authentication information in the object.
* 3. It adds a nonce, login, and logout route to the server
*
* This function returns another function that can take an event listen as a parameter
* and calls it with the updated request object if none of the ssx routes are hit.
*
* @param ssx - The SSX server instance.
* @returns requestListener: function (req: Request, res: Response) =\> (req: IncomingMessage, res: ServerResponse)
*/
export declare const SSXHttpMiddleware: (ssx: SSXServerBaseClass, routes?: SSXServerRoutes) => (requestListener?: (req: any, res: any) => void) => (req: IncomingMessage, res: ServerResponse) => Promise>;
//# sourceMappingURL=index.d.ts.map