UNPKG

@foal/jwt

Version:

Authentication with JWT for FoalTS

12 lines (11 loc) 454 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCsrfTokenFromCookie = getCsrfTokenFromCookie; // std const core_1 = require("@foal/core"); // FoalTS const constants_1 = require("../constants"); function getCsrfTokenFromCookie(request) { const csrfCookieName = core_1.Config.get('settings.jwt.csrf.cookie.name', 'string', constants_1.JWT_DEFAULT_CSRF_COOKIE_NAME); return request.cookies[csrfCookieName]; }