{"name":"http-signature","description":"Reference implementation of Joyent's HTTP Signature scheme.","version":"1.3.1","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.10"},"main":"lib/index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"assert-plus":"^1.0.0","jsprim":"^1.2.2","sshpk":"^1.14.1"},"devDependencies":{"tap":"0.4.2","uuid":"^2.0.2"},"gitHead":"dde01882d5f4e655ffcf3dcc5bef8e6218b8fef2","_id":"http-signature@1.3.1","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Y29YKEc8MQsjch/VzkUVJ+2MXd9WcR42fK5u36CZf4G8bXw2DXMTWuESiB0R6m59JAWxlPPw5/Fri/t/AyyueA==","shasum":"739fe2f8897ba84798e3e54b699a9008a8724ff9","tarball":"http://registry-npm.ywwl.com/http-signature/download/http-signature-1.3.1.tgz","fileCount":9,"unpackedSize":35043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwghKCRA9TVsSAnZWagAAei4P/1wS3oN+j4J6BRVfWA10\nNrzatBGB490EtJM9X+CBh9ePDSVBfmWoBWvvaYQVQ/bqyhwqXv8HIsb4tCBi\nDiO56PJt3uFfIyzTQI7FYjdM7GN4hPbf1QfvJR1EASyQa5shCakDvX+Cy9jR\nZPykoDBlE6hl7oUwk6hZmBzajc8qO93Osy+Eq2r2RSGy8JwZ81wn8+KQ89eP\nl+DbxHyVrWTkaxD9HqI5HY135Xju73Z+jYQBrCeL0Ia6Rf5uAS3DR3gZULE5\nuC+g2igD//qZGHCAq/jVop4lY2v4dDQ1xeiUNF9jmYrupHXWesgK3R6hwdDx\nh/V38zjbz1M4M+RxqR93dXem03T6j/ey7Jhw7law6UxdFQKaBxzdExa3Ahek\nx2psPAFQ8WHuwIrWBGyeqHO5bvSA+5eQ/fAkVAoOVkB96wWwADx39cavHYrt\nkc5G3suTp2eBTLKKFwGQm7tPplBzVLRu1IrjSacwxHZoOTYwvWex+mP2HRkg\nSQmJbyHfisErzsxSlmevmvG6SxZ6OJejk5xVaGT7pL3H/k46r+YHvllMGYLI\nLuv2dxKbvCqY9zdzpppXJKrtgeBUNRVttk/s/7n5P1zXIAWi157BBahelsTm\nyDcSki7H7k9gtQ83U9rhmXmeZiqKpvVGan9Q/6o8rIQ0xBr4KAux1/nP2sek\nPVm3\r\n=WyGQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGh8b1QBjWLfsYK9LyVIh28YCkhIcqsrZB7HhOSXcRhUAiEAqbLJJZIyoj9dosjHvvr5yHPie27y++A0tkaWAy+8cc4="}],"size":9879,"noattachment":false,"key":"/http-signature/-/http-signature-1.3.1.tgz"},"maintainers":[{"email":"alex@cooperi.net","name":"arekinath"},{"email":"aguycalledrichard@gmail.com","name":"chudley"},{"email":"kody.kantor@joyent.com","name":"kkantor"},{"email":"kusorbox@gmail.com","name":"kusor"},{"email":"mcavage@gmail.com","name":"mcavage"},{"email":"cody.mello@joyent.com","name":"melloc"},{"email":"pmooney@pfmooney.com","name":"pfmooney"},{"email":"todd.whiteman@joyent.com","name":"todd.whiteman"},{"email":"trentm@gmail.com","name":"trentm"}],"_npmUser":{"name":"trentm","email":"trentm@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-signature_1.3.1_1572997193608_0.7262216540556601"},"_hasShrinkwrap":false,"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":1572997193757,"_cnpm_publish_time":1572997193757,"dist-tags":{"latest":"1.4.0"}}