-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
1 lines (1 loc) · 5.04 KB
/
package.json
1
{"name":"passport-oauth1","version":"1.0.1","description":"OAuth 1.0 authentication strategy for Passport.","keywords":["passport","auth","authn","authentication","authz","authorization","oauth"],"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-oauth1.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-oauth1/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","oauth":"0.9.x","utils-merge":"1.x.x"},"devDependencies":{"mocha":"1.x.x","chai":"1.x.x","chai-passport-strategy":"0.1.x"},"engines":{"node":">= 0.4.0"},"scripts":{"test":"node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js"},"testling":{"browsers":["chrome/latest"],"harness":"mocha","files":["test/bootstrap/testling.js","test/*.test.js","test/**/*.test.js"]},"readme":"# passport-oauth1\n\n[![Build](https://travis-ci.org/jaredhanson/passport-oauth1.png)](http://travis-ci.org/jaredhanson/passport-oauth1)\n[![Coverage](https://coveralls.io/repos/jaredhanson/passport-oauth1/badge.png)](https://coveralls.io/r/jaredhanson/passport-oauth1)\n[![Dependencies](https://david-dm.org/jaredhanson/passport-oauth1.png)](http://david-dm.org/jaredhanson/passport-oauth1)\n\nGeneral-purpose OAuth 1.0 authentication strategy for [Passport](http://passportjs.org/).\n\nThis module lets you authenticate using OAuth in your Node.js applications.\nBy plugging into Passport, OAuth authentication can be easily and unobtrusively\nintegrated into any application or framework that supports\n[Connect](http://www.senchalabs.org/connect/)-style middleware, including\n[Express](http://expressjs.com/).\n\nNote that this strategy provides generic OAuth support. In many cases, a\nprovider-specific strategy can be used instead, which cuts down on unnecessary\nconfiguration, and accommodates any provider-specific quirks. See the\n[list](https://github.com/jaredhanson/passport/wiki/Strategies) for supported\nproviders.\n\nDevelopers who need to implement authentication against an OAuth provider that\nis not already supported are encouraged to sub-class this strategy. If you\nchoose to open source the new provider-specific strategy, please add it to the\nlist so other people can find it.\n\n## Install\n\n $ npm install passport-oauth1\n\n## Usage\n\n#### Configure Strategy\n\nThe OAuth authentication strategy authenticates users using a third-party\naccount and OAuth tokens. The provider's OAuth endpoints, as well as the\nconsumer key and secret, are specified as options. The strategy requires a\n`verify` callback, which receives a token and profile, and calls `done`\nproviding a user.\n\n passport.use(new OAuth2Strategy({\n requestTokenURL: 'https://www.example.com/oauth/request_token',\n accessTokenURL: 'https://www.example.com/oauth/access_token',\n userAuthorizationURL: 'https://www.example.com/oauth/authorize',\n consumerKey: EXAMPLE_CONSUMER_KEY,\n consumerSecret: EXAMPLE_CONSUMER_SECRET,\n callbackURL: \"http://127.0.0.1:3000/auth/example/callback\"\n },\n function(token, tokenSecret, profile, done) {\n User.findOrCreate({ exampleId: profile.id }, function (err, user) {\n return done(err, user);\n });\n }\n ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'oauth'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n app.get('/auth/example',\n passport.authenticate('oauth'));\n \n app.get('/auth/example/callback', \n passport.authenticate('oauth', { failureRedirect: '/login' }),\n function(req, res) {\n // Successful authentication, redirect home.\n res.redirect('/');\n });\n\n## Related Modules\n\n- [passport-oauth2](https://github.com/jaredhanson/passport-oauth2) — OAuth 2.0 authentication strategy\n- [passport-http-oauth](https://github.com/jaredhanson/passport-http-oauth) — OAuth authentication strategy for APIs\n- [OAuthorize](https://github.com/jaredhanson/oauthorize) — OAuth service provider toolkit\n\n## Tests\n\n $ npm install\n $ npm test\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) 2011-2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>\n","readmeFilename":"README.md","_id":"passport-oauth1@1.0.1","dist":{"shasum":"41ade140b881392b144cbdd426095c035a91ad9c","tarball":"http://registry.npmjs.org/passport-oauth1/-/passport-oauth1-1.0.1.tgz"},"_from":"passport-oauth1@1.x.x","_npmVersion":"1.2.25","_npmUser":{"name":"jaredhanson","email":"jaredhanson@gmail.com"},"maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}],"directories":{},"_shasum":"41ade140b881392b144cbdd426095c035a91ad9c","_resolved":"https://registry.npmjs.org/passport-oauth1/-/passport-oauth1-1.0.1.tgz"}