@villedemontreal/jwt-validator
Version:
Module to validate JWT (JSON Web Tokens)
17 lines • 521 B
JavaScript
;
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