{"_id":"passport-oauth2-client-password","_rev":"16-aa1e445f1d787c025f1d875acc888075","name":"passport-oauth2-client-password","description":"OAuth 2.0 client password authentication strategy for Passport.","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"passport-oauth2-client-password","version":"0.1.0","description":"OAuth 2.0 client password authentication strategy for Passport.","keywords":["passport","oauth","oauth2","authn","authentication","authz","authorization","api"],"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-oauth2-client-password.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-oauth2-client-password/issues"},"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-oauth2-client-password","dependencies":{"pkginfo":"0.2.x","passport":"~0.1.1"},"devDependencies":{"vows":"0.6.x"},"scripts":{"test":"NODE_PATH=lib node_modules/.bin/vows test/*-test.js"},"engines":{"node":">= 0.4.0"},"_npmUser":{"name":"jaredhanson","email":"jaredhanson@gmail.com"},"_id":"passport-oauth2-client-password@0.1.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"4a66df1e19e94d3d6dcc15f05273aa2beedd2fbd","tarball":"https://registry.npmjs.org/passport-oauth2-client-password/-/passport-oauth2-client-password-0.1.0.tgz","integrity":"sha512-WMY5Wjt5VmcnxMjprbfgsKHG14jKRB1tUb4x+LS36HbPnaQw5ltHFbBZcT5yGu1gfTxY7DnWl4GXWSb0VYRhCQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBjaR28Aa4y6Y2iFPjLFRWR/FwRpOpRy7pxphA7vYXaWAiEAgyav55n8Zi+Fnn4vJL2wB9LytSLF+dalWEHoH0G4Yqk="}]},"maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}]},"0.1.1":{"name":"passport-oauth2-client-password","version":"0.1.1","description":"OAuth 2.0 client password authentication strategy for Passport.","keywords":["passport","oauth","oauth2","authn","authentication","authz","authorization","api"],"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-oauth2-client-password.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-oauth2-client-password/issues"},"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-oauth2-client-password","dependencies":{"pkginfo":"0.2.x","passport":"~0.1.1"},"devDependencies":{"vows":"0.6.x"},"scripts":{"test":"NODE_PATH=lib node_modules/.bin/vows test/*-test.js"},"engines":{"node":">= 0.4.0"},"_id":"passport-oauth2-client-password@0.1.1","dist":{"shasum":"4f16e25867628d0ae5a0b2f57c8c9b9b266b20b2","tarball":"https://registry.npmjs.org/passport-oauth2-client-password/-/passport-oauth2-client-password-0.1.1.tgz","integrity":"sha512-EPRa3l3I/K45iNu3kfhWrNSBey38DO0JIREmx4ApM2B0qGC9gnaMWZqqw7+jO9awPIURfVuTVnlhmdZFxwxDew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTqBw8A/h3fIBSXiH1yDzYsXfKe5uEcyydhqBEr2465AIgK7uwXZezu0mFwuPzPWWDeCNAKSjbdVw6yOLz+4BoQno="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"jaredhanson","email":"jaredhanson@gmail.com"},"maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}]},"0.1.2":{"name":"passport-oauth2-client-password","version":"0.1.2","description":"OAuth 2.0 client password authentication strategy for Passport.","keywords":["passport","oauth","oauth2","authn","authentication","authz","authorization","api"],"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-oauth2-client-password.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-oauth2-client-password/issues"},"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"passport-strategy":"1.x.x"},"devDependencies":{"vows":"0.7.x"},"scripts":{"test":"NODE_PATH=lib node_modules/.bin/vows test/*-test.js"},"engines":{"node":">= 0.4.0"},"homepage":"https://github.com/jaredhanson/passport-oauth2-client-password","_id":"passport-oauth2-client-password@0.1.2","dist":{"shasum":"4f378b678b92d16dbbd233a6c706520093e561ba","tarball":"https://registry.npmjs.org/passport-oauth2-client-password/-/passport-oauth2-client-password-0.1.2.tgz","integrity":"sha512-GHQH4UtaEZvCLulAxGKHYoSsPRoPRmGsdmaZtMh5nmz80yMLQbdMA9Bg2sp4/UW3PIxJH/143hVjPTiXaNngTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAihs11KY78Mg4X5dfFdpQbFfUL0JNE+WIfU9+1yV2RQAiEAm3h4vR5kSshlUzxtSv05MKbMIrtrIQm3E7dMJLEvGDI="}]},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"jaredhanson","email":"jaredhanson@gmail.com"},"maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}]}},"readme":"# passport-oauth2-client-password\n\nOAuth 2.0 client password authentication strategy for [Passport](https://github.com/jaredhanson/passport).\n\nThis module lets you authenticate requests containing client credentials in the\nrequest body, as [defined](http://tools.ietf.org/html/draft-ietf-oauth-v2-27#section-2.3.1)\nby the OAuth 2.0 specification.  These credentials are typically used protect\nthe token endpoint and used as an alternative to HTTP Basic authentication.\n\n## Install\n\n    $ npm install passport-oauth2-client-password\n\n## Usage\n\n#### Configure Strategy\n\nThe OAuth 2.0 client password authentication strategy authenticates clients\nusing a client ID and client secret.  The strategy requires a `verify` callback,\nwhich accepts those credentials and calls `done` providing a client.\n\n    passport.use(new ClientPasswordStrategy(\n      function(clientId, clientSecret, done) {\n        Clients.findOne({ clientId: clientId }, function (err, client) {\n          if (err) { return done(err); }\n          if (!client) { return done(null, false); }\n          if (client.clientSecret != clientSecret) { return done(null, false); }\n          return done(null, client);\n        });\n      }\n    ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'oauth2-client-password'`\nstrategy, to authenticate requests.  This strategy is typically used in\ncombination with HTTP Basic authentication (as provided by [passport-http](https://github.com/jaredhanson/passport-http)),\nallowing clients to include credentials in the request body.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication, using [OAuth2orize](https://github.com/jaredhanson/oauth2orize)\nmiddleware to implement the token endpoint:\n\n    app.get('/profile', \n      passport.authenticate(['basic', 'oauth2-client-password'], { session: false }),\n      oauth2orize.token());\n\n## Examples\n\nThe [example](https://github.com/jaredhanson/oauth2orize/tree/master/examples/express2)\nincluded with [OAuth2orize](https://github.com/jaredhanson/oauth2orize)\ndemonstrates how to implement a complete OAuth 2.0 authorization server.\n`ClientPasswordStrategy` is used to authenticate clients as they request access\ntokens from the token endpoint.\n\n## Tests\n\n    $ npm install --dev\n    $ make test\n\n[![Build Status](https://secure.travis-ci.org/jaredhanson/passport-oauth2-client-password.png)](http://travis-ci.org/jaredhanson/passport-oauth2-client-password)\n\n## Credits\n\n  - [Jared Hanson](http://github.com/jaredhanson)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2012-2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>\n","maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}],"time":{"modified":"2022-06-23T13:09:03.997Z","created":"2012-07-11T15:21:00.857Z","0.1.0":"2012-07-11T15:21:02.594Z","0.1.1":"2013-05-22T15:20:26.821Z","0.1.2":"2014-09-02T22:05:47.770Z"},"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-oauth2-client-password.git"},"homepage":"https://github.com/jaredhanson/passport-oauth2-client-password","keywords":["passport","oauth","oauth2","authn","authentication","authz","authorization","api"],"bugs":{"url":"http://github.com/jaredhanson/passport-oauth2-client-password/issues"},"readmeFilename":"README.md","users":{"karlbateman":true,"crazyjingling":true,"theaklair":true,"largepuma":true,"processbrain":true,"adlibdigital":true,"obsessiveprogrammer":true}}