{"author":{"name":"Joyent, Inc"},"name":"http-signature","description":"Reference implementation of Joyent's HTTP Signature Scheme","version":"0.9.0","homepage":"http://www.joyent.com","repository":{"type":"git","url":"git://github.com/joyent/node-http-signature.git"},"engines":{"node":"~0.4.9"},"main":"lib/index.js","scripts":{"pretest":"which gjslint; if [[ \"$?\" = 0 ]] ; then  gjslint --nojsdoc -r . -e node_modules; else echo \"Missing gjslint. Skipping lint\"; fi","test":"./node_modules/.bin/whiskey --quiet --sequential --timeout 2500 -t \"`find tst -name *.test.js | xargs`\""},"dependencies":{"sprintf":"0.1.1"},"devDependencies":{"httpu":"0.0.1","node-uuid":"1.2.0","whiskey":"0.4.0"},"_npmJsonOpts":{"file":"/Users/mark/.npm/http-signature/0.9.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"http-signature@0.9.0","_engineSupported":true,"_npmVersion":"1.0.15","_nodeVersion":"v0.4.9","_defaultsLoaded":true,"dist":{"shasum":"b1df2888b77e2ac471b1d32c0dae9ce699b88cf0","tarball":"http://registry-npm.ywwl.com/http-signature/download/http-signature-0.9.0.tgz","integrity":"sha512-mYSyqgj2GH6HmrHPMHDVdhug4NP2M7VyQ3k1KUVK1yCCNxH4xh9b4rNGOf6rFUSrwnmsBimeVDNzXWmWyPuNSg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXlrr0/gKpBzAwAr3hRJv8gvStsrYQCQ2AuH4/XzjUIgIgXfF9t1JCKTLRN9PGb7u8jP08onTT+yvQ5oPSAL+yi3E="}],"size":11410,"noattachment":false,"key":"/http-signature/-/http-signature-0.9.0.tgz"},"directories":{},"readme":"# node-http-signature\n\nnode-http-signature is a node.js library that has client and server components\nfor Joyent's [HTTP Signature Scheme](http_signing.md).\n\n## Usage\n\nNote the example below signs a request with the same key/cert used to start an\nHTTP server. This is almost certainly not what you actually want, but is just\nused to illustrate the API calls; you will need to provide your own key\nmanagement in addition to this library.\n\n### Client\n\n```js\nvar fs = require('fs');\nvar https = require('https');\nvar httpSignature = require('http-signature');\n\nvar key = fs.readFileSync('./key.pem', 'ascii');\n\nvar options = {\n  host: 'localhost',\n  port: 8443,\n  path: '/',\n  method: 'GET',\n  headers: {}\n};\n\n// Adds a 'Date' header in, signs it, and adds the\n// 'Authorization' header in.\nvar req = https.request(options, function(res) {\n  console.log(res.statusCode);\n});\n\n\nhttpSignature.sign(req, {\n  key: key,\n  keyId: './cert.pem',\n  keyPassphrase: 'secret' // (optional)\n});\n\nreq.end();\n```\n\n### Server\n\n```js\nvar fs = require('fs');\nvar https = require('https');\nvar httpSignature = require('http-signature');\n\nvar options = {\n  key: fs.readFileSync('./key.pem'),\n  cert: fs.readFileSync('./cert.pem')\n};\n\nhttps.createServer(options, function (req, res) {\n  var rc = 200;\n  var parsed = httpSignature.parseRequest(req);\n  var pub = fs.readFileSync(parsed.keyId, 'ascii');\n  if (!httpSignature.verifySignature(parsed, pub))\n    rc = 401;\n\n  res.writeHead(rc);\n  res.end();\n}).listen(8443);\n```\n\n## Installation\n\n    npm install http-signature\n\n## License\n\nMIT.\n\n## Bugs\n\nSee <https://github.com/joyent/node-http-signature/issues>.\n","publish_time":1310678507284,"maintainers":[{"name":"bahamat","email":"bahamat@digitalelf.net"},{"name":"todd.whiteman","email":"todd.whiteman@joyent.com"},{"name":"kusor","email":"kusorbox@gmail.com"},{"name":"michael.hicks","email":"michael.hicks@joyent.com"},{"name":"pfmooney","email":"pmooney@pfmooney.com"},{"name":"mcavage","email":"mcavage@gmail.com"},{"name":"arekinath","email":"alex@cooperi.net"},{"name":"melloc","email":"melloc@writev.io"}],"_cnpm_publish_time":1310678507284,"dist-tags":{"latest":"1.4.0"}}