UNPKG

@villedemontreal/jwt-validator

Version:
17 lines 521 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isRequestWithJwt = void 0; const _ = require("lodash"); const constants_1 = require("../config/constants"); /** * Request with JWT Type Guard */ const isRequestWithJwt = (obj) => { return (obj && _.isObject(obj) && 'get' in obj && 'headers' in obj && constants_1.constants.requestExtraVariables.JWT in obj); }; exports.isRequestWithJwt = isRequestWithJwt; //# sourceMappingURL=expressRequest.js.map