motion
Version:
motion - moving development forward
78 lines (77 loc) • 3.75 kB
JSON
{
"_args": [
[
"http-signature@https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz",
"/Users/nw/flint/packages/flint"
]
],
"_from": "http-signature@>=0.10.0 <0.11.0",
"_id": "http-signature@0.10.1",
"_inCache": true,
"_location": "/http-signature",
"_phantomChildren": {},
"_requested": {
"name": "http-signature",
"raw": "http-signature@https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz",
"rawSpec": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz",
"type": "remote"
},
"_requiredBy": [
"/request"
],
"_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz",
"_shasum": "4fbdac132559aa8323121e540779c0a012b27e66",
"_shrinkwrap": null,
"_spec": "http-signature@https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz",
"_where": "/Users/nw/flint/packages/flint",
"author": {
"name": "Joyent, Inc"
},
"bugs": {
"url": "https://github.com/joyent/node-http-signature/issues"
},
"contributors": [
{
"name": "Mark Cavage",
"email": "mcavage@gmail.com"
},
{
"name": "David I. Lehn",
"email": "dil@lehn.org"
}
],
"dependencies": {
"asn1": "0.1.11",
"assert-plus": "^0.1.5",
"ctype": "0.5.3"
},
"description": "Reference implementation of Joyent's HTTP Signature scheme.",
"devDependencies": {
"node-uuid": "^1.4.1",
"tap": "0.4.2"
},
"engines": {
"node": ">=0.8"
},
"homepage": "https://github.com/joyent/node-http-signature/",
"keywords": [
"https",
"request"
],
"license": "MIT",
"main": "lib/index.js",
"name": "http-signature",
"optionalDependencies": {},
"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});\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",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/joyent/node-http-signature.git"
},
"scripts": {
"test": "tap test/*.js"
},
"version": "0.10.1"
}