Last active
October 20, 2017 04:01
-
-
Save mittsh/b69613c16e2421ae45b08cdeaab5b2ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function evaluate(context){ | |
var stringToSign = ''; | |
var request = context.getCurrentRequest(); | |
var bodyKeys = request.getUrlEncodedBodyKeys().sort(); | |
for (var i = 0; i < bodyKeys.length; i++) { | |
var key = bodyKeys[i]; | |
if ('signature' !== key) { | |
stringToSign += key + "=" + request.getUrlEncodedBodyKey(key); | |
} | |
} | |
return stringToSign; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment