{"_id":"@acceleratxr/passport-oauth2","_rev":"3-ccefaa0256cda1c400773326fd17d2ce","name":"@acceleratxr/passport-oauth2","dist-tags":{"latest":"1.7.0"},"versions":{"1.6.1":{"name":"@acceleratxr/passport-oauth2","version":"1.6.1","description":"OAuth 2.0 authentication strategy for Passport.","keywords":["passport","auth","authn","authentication","authz","authorization","oauth","oauth2"],"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-oauth2.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-oauth2/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/jaredhanson"},"license":"MIT","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"base64url":"3.x.x","oauth":"0.9.x","passport-strategy":"1.x.x","uid2":"0.0.x","utils-merge":"1.x.x"},"devDependencies":{"make-node":"0.4.6","mocha":"2.x.x","chai":"2.x.x","proxyquire":"0.6.x","chai-passport-strategy":"1.x.x"},"engines":{"node":">= 0.4.0"},"scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js"},"gitHead":"17c1b5b31106151dad0784fdb2899e7267d6112d","homepage":"https://github.com/jaredhanson/passport-oauth2#readme","_id":"@acceleratxr/passport-oauth2@1.6.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-pDsaic1tSHqw1+Xi9fs0rqHebP4D3t1y18AJwqJFQLaSJlMQNTiFB183JnV7w4beiZDWzWOO09N5iGiIJjFMFg==","shasum":"834f4292aad2893174e90f1c6b8b673c22fee3c0","tarball":"https://registry.npmjs.org/@acceleratxr/passport-oauth2/-/passport-oauth2-1.6.1.tgz","fileCount":15,"unpackedSize":36987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiDCqFCRA9TVsSAnZWagAArioQAJL0pxYavJXN4CB4FNrG\nNGGhKy3Arv0WWm9EPeGfCsTQ7b1xV5Xh3TVoNi9WMFy4HF6zo9i1JaRYQQqy\n41MngD3ITxC0ZqMANej1HgTvwz7BSbJ5KUS0nWpiMtyQDO9RNQbsDZEhdJh8\n+eg4HbCnwYNUEXAddJRpA/SmNTcVHMVynqfVIoZp+oLEA5iK6bNP93rAkX6f\n+ePTiLjEx03nTnQfqDsF/gKOkLG+vFG/mJ39RMAmmwgPf738gjHSYlNop3/r\nInj3wnxquxTz54GCGEWQCfHJaP9RMEVxvesoKDBPdjli9hm9ykeHUnVACgso\n7HjYGCN6J2c8yfOlpDg6hgWEtDYHPuHqpXUGHhWsfjJ9DL2juNXlgOxvmt6G\nRWdFK+kO2Q50AEgSbfXPFbKTRFmkqR7fnHLcn6EOh8Q6Yv7PINHPF1rWDwH3\nauor6RRAkws12/sJzrF6JpQ0BP63To/yoO3CbDQTLFNeo0cwrOeLnu+4dqrx\nW64P+KeolcNboATFsVEq+efulElbwwVp6//CEl0eEIwDbfeCbeftTDsbwFev\nf57ptF2LawDdzHhKItrVccHOS1IPhKiuaxs2Xo7n048Z31F65Km9pnXfKXBH\nCCzq5N7cV2bftvpyI5q681LD/RTqVwX52M+TWxPm5gvrbbvq5TBqkNJMOJQ/\nB9Xe\r\n=eIXI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4pqFNv95aDrpGyfprrOQYyGTGl8eHCmgy0dOil2XsTAIgNeY5o6gd6+emIgb+ZnQwjgltb3UXqE1jT/elQVo6rHw="}]},"_npmUser":{"name":"acceleratxr","email":"admin@acceleratxr.com"},"directories":{},"maintainers":[{"name":"acceleratxr","email":"admin@acceleratxr.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-oauth2_1.6.1_1644964484960_0.4888787561129384"},"_hasShrinkwrap":false},"1.7.0":{"name":"@acceleratxr/passport-oauth2","version":"1.7.0","description":"OAuth 2.0 authentication strategy for Passport.","keywords":["passport","auth","authn","authentication","authz","authorization","oauth","oauth2"],"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-oauth2.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-oauth2/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/jaredhanson"},"license":"MIT","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"base64url":"3.x.x","oauth":"0.9.x","passport-strategy":"1.x.x","uid2":"0.0.x","utils-merge":"1.x.x"},"devDependencies":{"make-node":"0.4.6","mocha":"2.x.x","chai":"2.x.x","proxyquire":"0.6.x","chai-passport-strategy":"1.x.x"},"engines":{"node":">= 0.4.0"},"scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js"},"gitHead":"92e00ff3a897759814afc172f1c7378a0989d7cb","homepage":"https://github.com/jaredhanson/passport-oauth2#readme","_id":"@acceleratxr/passport-oauth2@1.7.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-VVzDiOqph2O9FyK7sFmvEE3QnGjQetJEQAp2tRJEsb4T7/0NqaxfP6YgcRIgznqasMMAjCO/6N5vZRnPZpR4Eg==","shasum":"851245ef51ecdf06be1da6da5156704019539766","tarball":"https://registry.npmjs.org/@acceleratxr/passport-oauth2/-/passport-oauth2-1.7.0.tgz","fileCount":15,"unpackedSize":36876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiDDduCRA9TVsSAnZWagAAP8QP/ifddEpzbT+aX4dK6EIS\niH0NbtlNBteC7iFuSMQejYaJIOHCut40ZsTVibQLMpFZa/KqtuFSC2bdZwZ3\nu5LqjxzBKnJ02jJ4Dodz8H5qmG8ykoZLgm5ljifYLqLaRT8uIdWzYXKvtOgw\nF2RYVBHLk6MFbOffm2beVqj9UzMqRHc73smmGgIqiLQuS8ZZuAVA5gc7xUyJ\neCfAR8cqsTGLyhmeQvC7zdrFuaFqVsPR6WqS1/mtXNWIaR6ne+50HheOEgEY\nyGcBOB+s8ngKveo5qgIA7n1yEn35tJDCq8uZzKaCqlYleoV+tQW5sueFgj4i\nSSe+Xiv/grL6xlVie+TTE2aVzV5pyFGQpOWIc3cpIvMIIfUSAh1Bp38sYs6H\nR/tPt7Fosnjf9YnQEBCsdP+t/afSNmmmKYPAnfSeN2oXfFhQI+vXYLtoSIZ9\nHGgoUdtk6tDLzGcfIOXeyUesSy8xXXP/1FUpbmtJ/n/8FtRehbVOi92mSCAF\nRWSz1NRK7wYpghf96hKv1Ud0V+P7zSVMTd9gAjnprR1SzOZvTZIQYBDsen9q\nA7ebXAwBX3VtlPfZMh0icBlsldzy/5dsccRrU3cChaRoQxjhhCSkK2tyAMCq\n1Y3HucV1p7D/XF8cQfmSpV9mJrefnFRiE3rO74l7SscjLryFlxSFr2DrA7Ia\npIyF\r\n=8ZKV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8lQvlMOo3iPAnbLa3KbJuTUqipgX1N8z4FzpTFPRm8gIgEqpm887gOC3Yj48gQQIbCnEOWwYY9guG0kdudsm/75U="}]},"_npmUser":{"name":"acceleratxr","email":"admin@acceleratxr.com"},"directories":{},"maintainers":[{"name":"acceleratxr","email":"admin@acceleratxr.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-oauth2_1.7.0_1644967790769_0.6942594942974158"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-15T22:34:44.960Z","1.6.1":"2022-02-15T22:34:45.110Z","modified":"2022-04-04T11:06:41.667Z","1.7.0":"2022-02-15T23:29:50.981Z"},"maintainers":[{"name":"acceleratxr","email":"admin@acceleratxr.com"}],"description":"OAuth 2.0 authentication strategy for Passport.","homepage":"https://github.com/jaredhanson/passport-oauth2#readme","keywords":["passport","auth","authn","authentication","authz","authorization","oauth","oauth2"],"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-oauth2.git"},"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"bugs":{"url":"http://github.com/jaredhanson/passport-oauth2/issues"},"license":"MIT","readme":"# passport-oauth2\r\n\r\nGeneral-purpose OAuth 2.0 authentication strategy for [Passport](http://passportjs.org/).\r\n\r\nThis module lets you authenticate using OAuth 2.0 in your Node.js applications.\r\nBy plugging into Passport, OAuth 2.0 authentication can be easily and\r\nunobtrusively integrated into any application or framework that supports\r\n[Connect](http://www.senchalabs.org/connect/)-style middleware, including\r\n[Express](http://expressjs.com/).\r\n\r\nNote that this strategy provides generic OAuth 2.0 support.  In many cases, a\r\nprovider-specific strategy can be used instead, which cuts down on unnecessary\r\nconfiguration, and accommodates any provider-specific quirks.  See the\r\n[list](https://github.com/jaredhanson/passport/wiki/Strategies) for supported\r\nproviders.\r\n\r\nDevelopers who need to implement authentication against an OAuth 2.0 provider\r\nthat is not already supported are encouraged to sub-class this strategy.  If you\r\nchoose to open source the new provider-specific strategy, please add it to the\r\nlist so other people can find it.\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n  <sup>Advertisement</sup>\r\n  <br>\r\n  <a href=\"https://click.linksynergy.com/link?id=D*o7yui4/NM&offerid=507388.380582&type=2&murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Flearn-oauth-2%2F&u1=5I2riUEiNIRjPjdjxj6X4exzu3lhRkWY0et6Y8eyT3\">Learn OAuth 2.0 - Get started as an API Security Expert</a><br>Just imagine what could happen to YOUR professional career if you had skills in OAuth > 8500 satisfied students\r\n</p>\r\n\r\n---\r\n\r\n[![npm](https://img.shields.io/npm/v/passport-oauth2.svg)](https://www.npmjs.com/package/passport-oauth2)\r\n[![build](https://img.shields.io/travis/jaredhanson/passport-oauth2.svg)](https://travis-ci.org/jaredhanson/passport-oauth2)\r\n[![coverage](https://img.shields.io/coveralls/jaredhanson/passport-oauth2.svg)](https://coveralls.io/github/jaredhanson/passport-oauth2)\r\n[...](https://github.com/jaredhanson/passport-oauth2/wiki/Status)\r\n\r\n## Install\r\n\r\n    $ npm install passport-oauth2\r\n\r\n## Usage\r\n\r\n#### Configure Strategy\r\n\r\nThe OAuth 2.0 authentication strategy authenticates users using a third-party\r\naccount and OAuth 2.0 tokens.  The provider's OAuth 2.0 endpoints, as well as\r\nthe client identifer and secret, are specified as options.  The strategy\r\nrequires a `verify` callback, which receives an access token and profile,\r\nand calls `cb` providing a user.\r\n\r\n```js\r\npassport.use(new OAuth2Strategy({\r\n    authorizationURL: 'https://www.example.com/oauth2/authorize',\r\n    tokenURL: 'https://www.example.com/oauth2/token',\r\n    clientID: EXAMPLE_CLIENT_ID,\r\n    clientSecret: EXAMPLE_CLIENT_SECRET,\r\n    callbackURL: \"http://localhost:3000/auth/example/callback\"\r\n  },\r\n  function(accessToken, refreshToken, profile, cb) {\r\n    User.findOrCreate({ exampleId: profile.id }, function (err, user) {\r\n      return cb(err, user);\r\n    });\r\n  }\r\n));\r\n```\r\n\r\n#### Authenticate Requests\r\n\r\nUse `passport.authenticate()`, specifying the `'oauth2'` strategy, to\r\nauthenticate requests.\r\n\r\nFor example, as route middleware in an [Express](http://expressjs.com/)\r\napplication:\r\n\r\n```js\r\napp.get('/auth/example',\r\n  passport.authenticate('oauth2'));\r\n\r\napp.get('/auth/example/callback',\r\n  passport.authenticate('oauth2', { failureRedirect: '/login' }),\r\n  function(req, res) {\r\n    // Successful authentication, redirect home.\r\n    res.redirect('/');\r\n  });\r\n```\r\n\r\n## Related Modules\r\n\r\n- [passport-oauth1](https://github.com/jaredhanson/passport-oauth1) — OAuth 1.0 authentication strategy\r\n- [passport-http-bearer](https://github.com/jaredhanson/passport-http-bearer) — Bearer token authentication strategy for APIs\r\n- [OAuth2orize](https://github.com/jaredhanson/oauth2orize) — OAuth 2.0 authorization server toolkit\r\n\r\n## Contributing\r\n\r\n#### Tests\r\n\r\nThe test suite is located in the `test/` directory.  All new features are\r\nexpected to have corresponding test cases.  Ensure that the complete test suite\r\npasses by executing:\r\n\r\n```bash\r\n$ make test\r\n```\r\n\r\n#### Coverage\r\n\r\nAll new feature development is expected to have test coverage.  Patches that\r\nincrese test coverage are happily accepted.  Coverage reports can be viewed by\r\nexecuting:\r\n\r\n```bash\r\n$ make test-cov\r\n$ make view-cov\r\n```\r\n\r\n## License\r\n\r\n[The MIT License](http://opensource.org/licenses/MIT)\r\n\r\nCopyright (c) 2011-2016 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>\r\n\r\n\r\n","readmeFilename":"README.md"}