Name: js-handler/node_modules/restify/node_modules/http-signature/package.json
| 1: | { |
| 2: | "author": { |
| 3: | "name": "Joyent, Inc" |
| 4: | }, |
| 5: | "name": "http-signature", |
| 6: | "description": "Reference implementation of Joyent's HTTP Signature Scheme", |
| 7: | "version": "0.10.0", |
| 8: | "repository": { |
| 9: | "type": "git", |
| 10: | "url": "git://github.com/joyent/node-http-signature.git" |
| 11: | }, |
| 12: | "engines": { |
| 13: | "node": ">=0.8" |
| 14: | }, |
| 15: | "main": "lib/index.js", |
| 16: | "scripts": { |
| 17: | "test": "./node_modules/.bin/tap tst/*.js" |
| 18: | }, |
| 19: | "dependencies": { |
| 20: | "assert-plus": "0.1.2", |
| 21: | "asn1": "0.1.11", |
| 22: | "ctype": "0.5.2" |
| 23: | }, |
| 24: | "devDependencies": { |
| 25: | "node-uuid": "1.4.0", |
| 26: | "tap": "0.4.2" |
| 27: | }, |
| 28: | "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 actaully 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 var fs = require('fs');\n var https = require('https');\n var httpSignature = require('http-signature');\n\n var key = fs.readFileSync('./key.pem', 'ascii');\n\n var 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.\n var req = https.request(options, function(res) {\n console.log(res.statusCode);\n });\n\n\n httpSignature.sign(req, {\n key: key,\n keyId: './cert.pem'\n });\n\n req.end();\n\n### Server\n\n var fs = require('fs');\n var https = require('https');\n var httpSignature = require('http-signature');\n\n var options = {\n key: fs.readFileSync('./key.pem'),\n cert: fs.readFileSync('./cert.pem')\n };\n\n https.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## 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", |
| 29: | "readmeFilename": "README.md", |
| 30: | "bugs": { |
| 31: | "url": "https://github.com/joyent/node-http-signature/issues" |
| 32: | }, |
| 33: | "_id": "[email protected]", |
| 34: | "dist": { |
| 35: | "shasum": "f7644082ef1deb14b002517ec40e22f771120fc2" |
| 36: | }, |
| 37: | "_from": "[email protected]", |
| 38: | "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.0.tgz" |
| 39: | } |
