qs-google-signature3
v1.3.0
Published
QS wrapper which Autodetects signature parameter and replace it with a signature according to https://developers.google.com/maps/documentation/business/webservices/auth#digital_signatures
Downloads
11
Readme
Note
This is a fork of an unmaintained package created by by temsa. I forked this and published to NPM under qs-google-signature3 to fix a vulnerability with an old version of qs. Happy to delete/merge this into his original package if they come back. This is also a copy of text from https://github.com/Lexcelon/qs-google-signature2/edit/master/ReadMe.md as that package seems to be unpublished. :)
Introduction
This is a wrapper around qs package, made in order to create a querystring conforming to Google Digital Signature , by simply adding your signature key as the signature parameter, see Usage below.
It's especially intended as an almost drop'in replacement for qs package or querystring node API in packages such as :
Install
$> npm install qs-google-signature3Usage
var qs = require('qs-google-signature3');
var query = {
address: "New+York",
client: "clientID",
signature: "vNIXE0xscrmjlyV-12Nj_BvUPaw=" //this is the signature key provided by Google
}
var queryString = qs.stringify(query, url);
//=> address=New%2BYork&client=clientID&signature=WrTAou0zgXHjKwUPdsITPZeMXew=Debug
To display logs, thanks to debug use the environment variable "DEBUG" to set that you want to display "qs:signature" logs, e.g. :
$> DEBUG="qs:signature" node myProgram.jsIt can also be listed among other things to debug:
$> DEBUG="http,qs:signature,worker" node myProgram.jsLicense
MIT
