{"name":"http-signature","description":"Reference implementation of Joyent's HTTP Signature scheme.","version":"1.0.2","license":"MIT","author":{"name":"Joyent, Inc"},"contributors":[{"name":"Mark Cavage","email":"mcavage@gmail.com"},{"name":"David I. Lehn","email":"dil@lehn.org"},{"name":"Patrick Mooney","email":"patrick.f.mooney@gmail.com"}],"repository":{"type":"git","url":"git://github.com/joyent/node-http-signature.git"},"homepage":"https://github.com/joyent/node-http-signature/","bugs":{"url":"https://github.com/joyent/node-http-signature/issues"},"keywords":["https","request"],"engines":{"node":">=0.8","npm":">=1.3.7"},"main":"lib/index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"assert-plus":"^0.1.5","jsprim":"^1.2.2","sshpk":"^1.4.6"},"peerDependencies":{"sshpk":"^1.4.6"},"devDependencies":{"node-uuid":"^1.4.1","tap":"0.4.2"},"gitHead":"554a2b34035148fb0aa3fd187658fda5ec10f297","_id":"http-signature@1.0.2","_shasum":"ce3d530bf6c3eac704f1a7b4ad85033d3175dfa7","_from":".","_npmVersion":"2.14.4","_nodeVersion":"0.12.7","_npmUser":{"name":"arekinath","email":"alex@cooperi.net"},"dist":{"shasum":"ce3d530bf6c3eac704f1a7b4ad85033d3175dfa7","tarball":"http://registry-npm.ywwl.com/http-signature/download/http-signature-1.0.2.tgz","integrity":"sha512-z5YEVcQv6PwU7z2QdBSw8ez/5wLbD8j+RWS8D64+dLcAj1fAr89SYsgf2p9PieOv88qwYWnM2LQK+XxqooZVSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDK4863x/uQmBgNfg3nadygIA/WQISYbVJl+L1l1Blb3AIhAKZx8JBePlcx96nACXuuVO+t2QNt6+uTq6K60nfa+j+h"}],"size":14398,"noattachment":false,"key":"/http-signature/-/http-signature-1.0.2.tgz"},"maintainers":[{"name":"arekinath","email":"alex@cooperi.net"},{"name":"mcavage","email":"mcavage@gmail.com"},{"name":"pfmooney","email":"patrick.f.mooney@gmail.com"}],"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":1444954295894,"_cnpm_publish_time":1444954295894,"dist-tags":{"latest":"1.4.0"}}