{"_id":"@manifoldco/signature","_rev":"26-f918095abd7c29e006b965200e03c657","name":"@manifoldco/signature","description":"Verify signed HTTP requests from Manifold","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@manifoldco/signature","version":"1.0.0","description":"Verify signed HTTP requests from Manifold","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/manifoldco/node-signature.git"},"author":{"name":"Jeff Andersen","email":"@jeffandersen"},"license":"BSD-3-Clause","publishConfig":{"access":"public"},"scripts":{"test":"npm run jshint && npm run test:all","test:all":"mocha -R spec 'test/integration/**/*.js'","test:watch":"mocha -R spec --watch 'test/integration/**/*.js'","jshint":"jshint ."},"engines":{"node":">=4.4.6"},"dependencies":{"base64url":"^2.0.0","ed25519":"^0.0.4","es6-promise":"^4.1.0","raw-body":"^2.2.0"},"devDependencies":{"assert":"^1.4.1","body-parser":"^1.17.1","express":"^4.15.2","jshint":"^2.9.4","mocha":"^3.2.0","node-mocks-http":"^1.6.1","sinon":"^2.1.0"},"gitHead":"4639b5f31f5f87f092d00f98a29fd3225c769ac6","bugs":{"url":"https://github.com/manifoldco/node-signature/issues"},"homepage":"https://github.com/manifoldco/node-signature#readme","_id":"@manifoldco/signature@1.0.0","_shasum":"a5715d6a192667609316eae9bb321fd50b32e508","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.2","_npmUser":{"name":"jeffandersen","email":"jeffandersen@gmail.com"},"dist":{"shasum":"a5715d6a192667609316eae9bb321fd50b32e508","tarball":"https://registry.npmjs.org/@manifoldco/signature/-/signature-1.0.0.tgz","integrity":"sha512-NsEOPFU1yIkkvUiMGmMgD1qthW4kGkQu+CImf7uF8AdW/3etMX6cNxeZMBcTrednpQOdzfQRQe7eJ39HZilL/Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9iVDQTTGdOnDkniKzktp20gMLtz+fmKjfjvDKb2fq7wIgCtj6G6My4+E3CwQvIZPFg6Bu8ubX4Y6AP3vZvFzKQJE="}]},"maintainers":[{"name":"jeffandersen","email":"jeffandersen@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/signature-1.0.0.tgz_1491869187920_0.2845652063842863"},"directories":{}},"1.1.0":{"name":"@manifoldco/signature","version":"1.1.0","description":"Verify signed HTTP requests from Manifold","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/manifoldco/node-signature.git"},"author":{"name":"Jeff Andersen","email":"@jeffandersen"},"license":"BSD-3-Clause","publishConfig":{"access":"public"},"scripts":{"test":"npm run jshint && npm run test:all","test:all":"mocha -R spec 'test/integration/**/*.js'","test:watch":"mocha -R spec --watch 'test/integration/**/*.js'","jshint":"jshint ."},"engines":{"node":">=4.4.6"},"dependencies":{"base64url":"^2.0.0","ed25519":"^0.0.4","es6-promise":"^4.1.0"},"devDependencies":{"raw-body":"^2.2.0","assert":"^1.4.1","body-parser":"^1.17.1","express":"^4.15.2","jshint":"^2.9.4","mocha":"^3.2.0","node-mocks-http":"^1.6.1","sinon":"^2.1.0"},"gitHead":"97e9059d9a80bab3322db822566e14faf398a4e2","bugs":{"url":"https://github.com/manifoldco/node-signature/issues"},"homepage":"https://github.com/manifoldco/node-signature#readme","_id":"@manifoldco/signature@1.1.0","_shasum":"1749408b5edc50050e5eb6735d60ff501231d395","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.6","_npmUser":{"name":"jeffandersen","email":"jeffandersen@gmail.com"},"dist":{"shasum":"1749408b5edc50050e5eb6735d60ff501231d395","tarball":"https://registry.npmjs.org/@manifoldco/signature/-/signature-1.1.0.tgz","integrity":"sha512-NwlkeFD0o7ucBtnyTV9Iq4FoyNqDSlJMd5jZNYwPIL/C4NWLKcXtGH5EuirTGB7E8BBonLPbSgNZvv4mC/cF0g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDp+FHBKtIXpCnQberFPL9E0U4EwVJuWUUOHWMP/jnq5AiEAvCW2UY2wb3TugRjTcZkXkjXbdCZ4LkDjRU3g5bTlPV4="}]},"maintainers":[{"name":"creager","email":"matthew.creager@gmail.com"},{"name":"ianlivingstone","email":"ianrlivingstone@gmail.com"},{"name":"jbowes","email":"jbowes@repl.ca"},{"name":"jeffandersen","email":"jeffandersen@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/signature-1.1.0.tgz_1493254657045_0.5994401415809989"},"directories":{}}},"readme":"# node-signature\n\nVerify signed HTTP requests from Manifold\n\n[Code of Conduct](./.github/CONDUCT.md) | [Contribution Guidelines](./.github/CONTRIBUTING.md)\n\n[![GitHub release](https://img.shields.io/github/tag/manifoldco/node-signature.svg?label=latest)](https://github.com/manifoldco/node-signature/releases) [![Travis](https://img.shields.io/travis/manifoldco/node-signature/master.svg)](https://travis-ci.org/manifoldco/node-signature) [![License](https://img.shields.io/badge/license-BSD-blue.svg)](./LICENSE.md) [![NPM](https://img.shields.io/npm/v/@manifoldco/signature.svg)](https://npmjs.org/package/@manifoldco/signature)\n\n## Install\n\n```bash\n$ npm install @manifoldco/signature\n```\n\n## Usage\n\n```js\nvar Verifier = require('@manifoldco/signature').Verifier;\nvar verifier = new Verifier();\n\n// Using the promise interface\nverifier.test(req, req.rawBody).then(function() {\n  // Accept and handle request\n}).catch(function(err) {\n  // Deny request on error\n  res.statusCode = err.statusCode || 500;\n  // Respond with JSON, including a message property\n  return res.json({ message: err.message });\n});\n\n// Using the callback interface\nverifier.test(req, req.rawBody, function(err) {\n  if (err) {\n    // Deny request on error\n    res.statusCode = err.statusCode || 500;\n    // Respond with JSON, including a message property\n    return res.json({ message: err.message });\n  }\n\n  // Accept and handle request\n});\n```\n\n### Restify\n\n```js\nvar Verifier = require('@manifoldco/signature').Verifier;\nvar verifier = new Verifier();\n\n// The verification library expects that the req.rawBody property\n// exists so that the body dAoes not have to be read twice, this can be\n// done automaticall with restify-plugins bodyParser\napp.use(plugins.bodyParser({ mapParams: true }));\n\n// Applying the verifier middleware with default master key and options (recommended)\napp.use(function(req, res, next) {\n  verifier.test(req).then(function() {\n  // Accept and handle request\n    next();\n  }).catch(function(err) {\n    // Deny request on error\n    res.statusCode = err.statusCode || 500;\n    // Respond with JSON, including a message property\n    return res.json({ message: err.message });\n  });\n});\n```\n\n### Express\n\n```js\nvar verifier = require('@manifoldco/signature').express;\n\n// When using an existing body parser, we require you to add a verify step\n// which will keep track of the original request body for the verifier\n// middleware\napp.use(bodyParser.json({ verify: verifier.appendRawBody }));\n\n// Applying the verifier middleware with default master key and options (recommended)\napp.use(verifier.middleware());\n```\n","maintainers":[{"email":"jbowes@repl.ca","name":"jbowes"},{"email":"dave@manifold.co","name":"davehyndman"},{"email":"markjamieson0@gmail.com","name":"markjamieson"},{"email":"ntassone@gmail.com","name":"ntassone"}],"time":{"modified":"2022-06-12T21:04:54.102Z","created":"2017-04-11T00:06:28.753Z","1.0.0":"2017-04-11T00:06:28.753Z","1.1.0":"2017-04-27T00:57:39.266Z"},"homepage":"https://github.com/manifoldco/node-signature#readme","repository":{"type":"git","url":"git+ssh://git@github.com/manifoldco/node-signature.git"},"author":{"name":"Jeff Andersen","email":"@jeffandersen"},"bugs":{"url":"https://github.com/manifoldco/node-signature/issues"},"license":"BSD-3-Clause","readmeFilename":"README.md"}