{"_id":"oauth-client","_rev":"18-fa0f0bc8ba92746f52d55ce253af62d8","name":"oauth-client","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.5":{"name":"oauth-client","version":"0.1.5","engines":{"node":"0.1.100"},"author":{"name":"Ryan Fairchild"},"directories":{"lib":"./lib"},"main":"./lib/oauth","_id":"oauth-client@0.1.5","_nodeSupported":false,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/oauth-client/-/oauth-client-0.1.5.tgz","shasum":"0fd911585788ca49b8154c5b6868f239eebad020","integrity":"sha512-SZxryI9lAGTTiESWCtkF7+zcrlo79ISq0g+kwxSFTqwrBFheUT8U8zijN737K4Tntf1koTm8b7hiNANn8NNo3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAVZVovyW+PO7Ou97xW5Ij0+htuqMtggVZ7jqy+wqLOjAiEAuqmtCbXeVYZU0SbTKK/20OS4EN6j4ioZRFVTJfv5Ng4="}]}},"0.1.6":{"name":"oauth-client","version":"0.1.6","engines":{"node":"0.1.100"},"author":{"name":"Ryan Fairchild"},"directories":{"lib":"./lib"},"main":"./lib/oauth","_id":"oauth-client@0.1.6","_nodeSupported":false,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/oauth-client/-/oauth-client-0.1.6.tgz","shasum":"020f84c6c3ff2020e2345f7f2518ff6cb5d965fd","integrity":"sha512-rzOp8OeVcElCdGrQzWI0Eeu3OVDgLUzBoG2ZXI/N8xQX76gYPuvg5tMEXbQv4YGxWYOE/I2fZL1CaxcMhlIOpg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICPT+A2F1XhARbwCayyT1Vilnb7sAXDPV5KhNmDQR/JSAiAEModbsyOprhDOBirKBHnELiC8L8XLxndiELzt6hHGWw=="}]}},"0.1.7":{"name":"oauth-client","version":"0.1.7","engines":{"node":">=0.1.100"},"author":{"name":"Ryan Fairchild"},"directories":{"lib":"./lib"},"main":"./lib/oauth","_id":"oauth-client@0.1.7","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/oauth-client/-/oauth-client-0.1.7.tgz","shasum":"be99aad08d9131735369f8f52980f2ca023900fb","integrity":"sha512-fw/nwtAPHwkOM7j7OEzLm0yCfomfP17RYAs8FtSfiJgYcXACmW4w6+uLq7/DqshTxGF/uI8t3toitqyoLvWLTA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDMbxEmBDHirrGdIcDPIAFpw3mRyZFX2xdpRpG4Jcr+AAiEA4oFz2BPp3mY0mhh1c+AQkzffjDeIhniO9xJp+5/r1Jo="}]}},"0.2.0":{"name":"oauth-client","version":"0.2.0","engines":{"node":">=0.4.8"},"author":{"name":"Ryan Fairchild"},"contributors":[{"name":"Mak Nazečić-Andrlon"}],"directories":{"lib":"./lib"},"main":"./lib/oauth","dependencies":{"node-uuid":"1.1.0"},"description":"OAuth 1.0 (RFC 5849) client library.","repository":{"type":"git","url":"git://github.com/unscene/node-oauth.git"},"_npmJsonOpts":{"file":"/Users/rfairchild/.npm/oauth-client/0.2.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"oauth-client@0.2.0","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.14","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"9787c5294946586438256dca770a599e789d1394","tarball":"https://registry.npmjs.org/oauth-client/-/oauth-client-0.2.0.tgz","integrity":"sha512-MaQ5r41LAq+TGSt2fwJtWpUlGaQOtMMMjyOX5IY8yO/QT9x6qrfaowzVzWwCGwF71ASd83EbIWFfnVRD5av83w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH9h9gEJO87a6MQBIOg1dUHxwWJHCppnFEqC+bMqJEFHAiEAm/kLhRuK9w6rxve7BSh0wf2Gbkcv1WUD+qd6H+Sp0pg="}]},"scripts":{}},"0.3.0":{"name":"oauth-client","version":"0.3.0","engines":{"node":">=0.6.9"},"author":{"name":"Ryan Fairchild"},"contributors":[{"name":"Mak Nazečić-Andrlon"}],"directories":{"lib":"./lib"},"main":"./lib/oauth","dependencies":{"node-uuid":"1.1.0"},"description":"OAuth 1.0 (RFC 5849) client library.","repository":{"type":"git","url":"git://github.com/unscene/node-oauth.git"},"_npmUser":{"name":"unscene","email":"ryan.fairchild@gmail.com"},"_id":"oauth-client@0.3.0","devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.9","_defaultsLoaded":true,"dist":{"shasum":"20781d2073a7bbda7f5859a1cfebe85c669822d5","tarball":"https://registry.npmjs.org/oauth-client/-/oauth-client-0.3.0.tgz","integrity":"sha512-ORAj/OLb0L6wp4IZuNjqt5bTQRqMkjwTGJ1fh3eSranfvfPrbLk2Y20WCWswmEmnoo//Y5eUSf7RZ2lbRWcUpQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHRnxxQQz91zNfytYZ8Sn7Pg8HhL387AkeFiLeAAeoW+AiAIWCUvU25uXB9tEWG3cJtFpFENtBve7WbLoqzukDut5Q=="}]},"maintainers":[{"name":"unscene","email":"ryan.fairchild@gmail.com"}]}},"maintainers":[{"name":"unscene","email":"ryan.fairchild@gmail.com"}],"author":{"name":"Ryan Fairchild"},"description":"OAuth 1.0 (RFC 5849) client library.","repository":{"type":"git","url":"git://github.com/unscene/node-oauth.git"},"time":{"modified":"2022-06-22T15:34:09.369Z","created":"2011-06-22T21:31:56.233Z","0.1.5":"2011-06-22T21:31:56.233Z","0.1.6":"2011-06-22T21:31:56.233Z","0.1.7":"2011-06-22T21:31:56.233Z","0.2.0":"2011-06-22T21:31:56.233Z","0.3.0":"2012-02-02T23:10:13.798Z"},"readme":"\n# Overview\nAn [OAuth 1.0A](http://oauth.net/core/1.0a/) library for [node.js](http://nodejs.org).  There are currently a handful of OAuth libraries but I choose to take a different route with how the API is used.  The usage is really similar to [simplegeo's python OAuth client](http://github.com/simplegeo/python-oauth2).  It extends the built-in http client which makes signing requests require two extra parameters.  The only difference is that requests must have thier body (if present) and a signature provided, the client takes care of the rest. You are responsible for handling the authentication flow, check out [this example](http://github.com/unscene/node-oauth/blob/master/examples/twitter.js) to see possible uses.\n\nThanks to [ciaranj](http://github.com/ciaranj/) for providing a place to \n[start](http://github.com/ciaranj/node-oauth).\n\n# Installation\nYou can be fancy and clone the repo from here, or install [npm](http://github.com/isaacs/npm) and run:\n\n\tnpm install oauth-client\n\nThe include you must specify, if using the npm install:\n\n\trequire('oauth-client')\n\nOtherwise:\n\n\trequire('oauth')\n\n#Usage\n\nSee the example.\n\n## Sending request\nSending requests works very similar to the latest version of node's built-in http library.\n\n\tvar request = {\n\t\tport: 443,\n\t\thost: 'api.twitter.com',\n\t\thttps: true,\n\t\tpath: '/1/statuses/update.json',\n\t\toauth_signature: signer,\n\t\tmethod: 'POST',\n\t\tbody: body\n\t}\n\t\n\trequest = oauth.request(request, function(response) { ... });\n\treq.write(body);\n\treq.end();\n\t\nThe only two difference here between the built-in client and this one, is that you must include 'https: true' and the 'body' must be included in the request options.  You must include it so that the base string can be calculated correctly. There are a set of default headers included but you can override them by simply providing your own, your headers get merged into the defaults.  Be sure to include the same body as you specified in the request, this way you can still stream the body.\n\nIf you must specify your own oauth_* parameters put them in the query string:\n\n\tvar request = {\n\t\tport: 443,\n\t\thost: 'api.twitter.com',\n\t\thttps: true,\n\t\tpath: '/something?oauth_callback=oob',\n\t\toauth_signature: signer,\n\t\tmethod: 'POST',\n\t\tbody: body\n\t}\n\nThese params get split out and included in the authorization header.\t\n\n## Signatures\n\nThat last parameter is the only portion that takes some setup.  This is the piece that calculates and signed your requests.  There are two types provided: Plaintext & HMAC-SHA1 (RSA in the future maybe)\n\n\tvar consumer = oauth.createConsumer('key','secret');\n\tvar signer = oauth.createHmac(consumer);\n\t\n\tvar request = {\n\t\t..\n\t\toauth_signature: signer,\n\t\t..\n\t}\n\t\n\tclient.request(request, function(response) { ... });\n\nIf you have an authorized or unauthorized token you can provide that to the createHMAC constructor as well.\nYou just need to provide the type of signature you want along with the consumer and tokens, requests get automatically signed.\n\n## Consumers and Tokens\n\nConsumers and tokens both have a utility method decode() that will take an http response and collect the form encoded responses.\n\n\tvar data = ''\n\t\n\toauth.request(request, function(response)){\n\t\tresponse.on('data', function (chunk) {\tdata+=chunk });\n\t\tresponse.on('end', function () {\n\t\t\ttoken.decode(data);\n\t\t});\n\t});\n\n# Tests\nSee [vows](http://vowsjs.org/) to get started.\n\nOnce installed:\n\n\tvows tests/*\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2009 Ryan Fairchild &lt;ryan.fairchild [at] gmail [dot] com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","readmeFilename":""}