@foal/core
Version:
Full-featured Node.js framework, with no complexity
16 lines (15 loc) • 597 B
TypeScript
import { HttpResponse } from '../../../core';
import { Session } from '../../core';
/**
* Sends the session token in a cookie.
*
* If the CSRF protection is enabled, it also sends the CSRF token in a CSRF cookie.
*
* If a "user" argument is provided, it also sends its value in a "user" cookie.
*
* @export
* @param {HttpResponse} response - The HTTP response.
* @param {Session} session - The session object.
* @param {string} [user] - The content of the "user" cookie if any.
*/
export declare function setSessionCookie(response: HttpResponse, session: Session, user?: string): void;