arkerone/api-key-auth

new line \n causing issues

Closed this issue · 6 comments

In the parser.js line 101 shouldn't the new line character be escaped?
Something like
signatureParams.signingString += '\\n';

Without this I am always getting Bad signature for multiple headers. Everything works okay for 1 header

How did you build your signature?

I don't know why this websites have a problem to hash multiline string. Use this website : https://codebeautify.org/hmac-generator

Ok this websites use the CF (0d) and LF (0a) for new line but we need only the LF (0a) represented by '\n'

Okay, Thanks will check it out and let you know.

It is working as per the website you pointed out.