{"_id":"@blackspark/passport-oauth2-jwt-bearer","_rev":"1-11dce02c74b03801139626ff42e80b81","name":"@blackspark/passport-oauth2-jwt-bearer","description":"JSON Web Token (JWT) Bearer Token Profiles for OAuth 2.0 client authentication strategy for Passport.","dist-tags":{"latest":"0.2.0"},"versions":{"0.2.0":{"name":"@blackspark/passport-oauth2-jwt-bearer","version":"0.2.0","description":"JSON Web Token (JWT) Bearer Token Profiles for OAuth 2.0 client authentication strategy for Passport.","keywords":["passport","oauth","oauth2","authn","authentication","authz","authorization","api","jwt","json","token","bearer"],"repository":{"type":"git","url":"git://github.com/xtuple/passport-oauth2-jwt-bearer.git"},"bugs":{"url":"https://github.com/xtuple/passport-oauth2-jwt-bearer/issues"},"author":{"name":"bendiy","email":"ben@xtuple.com","url":"http://www.xtuple.com/"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-oauth2-jwt-bearer","dependencies":{"jws":"3.1.4","passport":"~0.1.1","pkginfo":"0.2.x"},"devDependencies":{"vows":"0.6.x"},"scripts":{"test":"NODE_PATH=lib node_modules/.bin/vows test/*-test.js"},"engines":{"node":">= 0.4.0"},"homepage":"https://github.com/xtuple/passport-oauth2-jwt-bearer#readme","directories":{"lib":"lib","test":"test"},"license":"ISC","gitHead":"64534bc12976d26253b2093c29f24850e1abb265","_id":"@blackspark/passport-oauth2-jwt-bearer@0.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"crbaptiste","email":"admin@blacksparkcorp.com"},"dist":{"integrity":"sha512-hXDZVHFCjeh09VDbK5tAFAFFUjpPvzRLRhFt9XWscoofbJUibH9ZtosEgSI2hze+BemXOh8pswBAWmH+DSkkAg==","shasum":"bc4ebb8e5c22ca105da8e4d76da147b11f51861d","tarball":"https://registry.npmjs.org/@blackspark/passport-oauth2-jwt-bearer/-/passport-oauth2-jwt-bearer-0.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEQg3BEQAHRUmfCiMxviyY2+7o/6E0WAqIMvlcSzvscgIgXlBzCayaTCGSRWBlV5+8fD9eMG4lWjqI0kfb0ReFGtY="}]},"maintainers":[{"name":"crbaptiste","email":"admin@blacksparkcorp.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-oauth2-jwt-bearer-0.2.0.tgz_1513795037166_0.7015714256558567"}}},"readme":"passport-oauth2-jwt-bearer\n==========================\n\nJSON Web Token (JWT) Bearer Token Profiles for OAuth 2.0 client authentication strategy for [Passport](https://github.com/jaredhanson/passport).\n\nThis module lets you authenticate requests containing client credentials in a JWT sent in the\nrequest body's assertion field, as [defined](http://tools.ietf.org/html/draft-jones-oauth-jwt-bearer-01#section-2.1)\nby the JSON Web Token (JWT) Bearer Token Profiles for OAuth 2.0 draft.  These credentials are typically used to protect\nthe token endpoint and used as an alternative to HTTP Basic authentication.  This module is modeled off of Google's OAuth 2.0 [Server to Server Applications](https://developers.google.com/accounts/docs/OAuth2ServiceAccount).  This module can be used with the [oauth2orize-jwt-bearer](https://github.com/xtuple/oauth2orize-jwt-bearer) module to create a JWT OAuth 2.0 exchange scenario server.\n\n## Install\n```bash\n$ npm install passport-oauth2-jwt-bearer\n```\n## Usage\n\n#### Configure Strategy\n\nThe JSON Web Token (JWT) Bearer Token Profiles for OAuth 2.0 client authentication strategy authenticates clients\nusing a JWT.  The strategy requires a `verify` callback,\nwhich accepts those credentials and calls `done` providing a client.\n```javascript\nvar ClientJWTBearerStrategy = require('passport-oauth2-jwt-bearer').Strategy;\n\npassport.use(new ClientJWTBearerStrategy(\n    function(claimSetIss, done) {\n        Clients.findOne({ clientId: claimSetIss }, function (err, client) {\n            if (err) { return done(err); }\n            if (!client) { return done(null, false); }\n            return done(null, client);\n        });\n    }\n));\n```\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'oauth2-jwt-bearer'`\nstrategy, to authenticate requests.\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```javascript\napp.get('/profile',\n    passport.authenticate(['oauth2-jwt-bearer'], { session: false }),\n    oauth2orize.token());\n```\n## Tests\n```bash\n$ npm install --dev\n$ make test\n```\n## Credits\n\n  - [bendiy](http://github.com/bendiy)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2012-2013 xTuple <[http://www.xtuple.com/](http://www.xtuple.com/)>\n","maintainers":[{"name":"crbaptiste","email":"admin@blacksparkcorp.com"}],"time":{"modified":"2022-04-04T19:22:29.039Z","created":"2017-12-20T18:37:17.252Z","0.2.0":"2017-12-20T18:37:17.252Z"},"homepage":"https://github.com/xtuple/passport-oauth2-jwt-bearer#readme","keywords":["passport","oauth","oauth2","authn","authentication","authz","authorization","api","jwt","json","token","bearer"],"repository":{"type":"git","url":"git://github.com/xtuple/passport-oauth2-jwt-bearer.git"},"author":{"name":"bendiy","email":"ben@xtuple.com","url":"http://www.xtuple.com/"},"bugs":{"url":"https://github.com/xtuple/passport-oauth2-jwt-bearer/issues"},"license":"ISC","readmeFilename":"README.md"}