UNPKG

@mtvproject/platform-crypto-middleware

Version:
14 lines 584 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const types_1 = require("./types"); function createAuthChainHeaders(authChain, timetamp, metadata = {}) { const headers = {}; authChain.forEach((item, index) => { headers[types_1.AUTH_CHAIN_HEADER_PREFIX + index] = JSON.stringify(item); }); headers[types_1.AUTH_TIMESTAMP_HEADER] = String(timetamp); headers[types_1.AUTH_METADATA_HEADER] = JSON.stringify(metadata); return headers; } exports.default = createAuthChainHeaders; //# sourceMappingURL=createAuthChainHeader.js.map