Skip to content

Instantly share code, notes, and snippets.

@mquarters
mquarters / pre-request-script.js
Last active October 20, 2021 21:44
Postman-hmac-authentication-v9
//Sign with Remote.it Http-Signature
const urlTool = require('url')
function computeHttpSignature(config, headerHash) {
let sig = 'Signature keyId="${keyId}",algorithm="${algorithm}",headers="${headers}",signature="${signature}"'
// compute sig here
let signingBase = ''
config.headers.forEach(function(h){
if (signingBase !== '') { signingBase += '\n' }