{"_id":"passport-http-header-token","_rev":"5-3a62afa93ea04f795a83a8b431de1eb2","name":"passport-http-header-token","description":"Passport strategy for authenticating with a http header token","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"passport-http-header-token","version":"1.0.0","description":"Passport strategy for authenticating with a http header token","keywords":["passport","auth","authn","authentication","header","token"],"author":{"name":"Pelle Almquist","email":"per.almquist@gmail.com"},"repository":{"type":"git","url":"git://github.com/peralmq/passport-http-header-token.git"},"bugs":{"url":"http://github.com/peralmq/passport-http-header-token/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"passport-strategy":"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":"mocha --reporter spec --require test/bootstrap/node test/*.test.js"},"gitHead":"a876ed3f518d61e38db8231e11d81cbd51521226","homepage":"https://github.com/peralmq/passport-http-header-token","_id":"passport-http-header-token@1.0.0","_shasum":"513a8aba0ea43087fc47a2541ad14e0bcd396f6e","_from":".","_npmVersion":"2.1.3","_nodeVersion":"0.10.32","_npmUser":{"name":"peralmq","email":"per.almquist@gmail.com"},"maintainers":[{"name":"peralmq","email":"per.almquist@gmail.com"}],"dist":{"shasum":"513a8aba0ea43087fc47a2541ad14e0bcd396f6e","tarball":"https://registry.npmjs.org/passport-http-header-token/-/passport-http-header-token-1.0.0.tgz","integrity":"sha512-xNdRPJh8i70vh1fOBHTtKoVqekr/LAz6KVbnjUo90z7i0/FroFBBg9jumu61Tw/wDZJE0S525tP8yqFeX4vfNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5ZuXRathwPGWTtep/88zz0zF7LO5PLoo53oKitK1HYwIgQ7bAOj+ASs3Nx5unRlMTkLC1kmgkYmmlIbOVkvGMhSk="}]}},"1.1.0":{"name":"passport-http-header-token","version":"1.1.0","description":"Passport strategy for authenticating with a http header token","keywords":["passport","auth","authn","authentication","header","token"],"author":{"name":"Pelle Almquist","email":"per.almquist@gmail.com"},"repository":{"type":"git","url":"git://github.com/peralmq/passport-http-header-token.git"},"bugs":{"url":"http://github.com/peralmq/passport-http-header-token/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"passport-strategy":"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":"mocha --reporter spec --require test/bootstrap/node test/*.test.js"},"gitHead":"596f706dd0598ec02a678a171b266b55b3e02126","homepage":"https://github.com/peralmq/passport-http-header-token#readme","_id":"passport-http-header-token@1.1.0","_shasum":"cdf6cbb6467247678cf0a9b66d11a6e4a6d0a6c8","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.0","_npmUser":{"name":"peralmq","email":"per.almquist@gmail.com"},"dist":{"shasum":"cdf6cbb6467247678cf0a9b66d11a6e4a6d0a6c8","tarball":"https://registry.npmjs.org/passport-http-header-token/-/passport-http-header-token-1.1.0.tgz","integrity":"sha512-F0gu6SQZ1THv5SyOjxHHh63dHubwzpzfhlobNQWTwLFgdZldgwE4b/TkCaLfcVWMxL6WmgmT4EVCMeBng9x84A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICC55Mas62jQYhsSj6b2ZIS0EI4/C12e0xp4igv5bZEjAiATyiXrHFAiKLf7BWsrw36ftJdD1btfAwT1DIMOPKIwAw=="}]},"maintainers":[{"name":"peralmq","email":"per.almquist@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/passport-http-header-token-1.1.0.tgz_1466154722637_0.5329308835789561"}}},"readme":"# passport-http-header-token\n[Passport](http://passportjs.org/) strategy for authenticating with a http header token - based on [passport-local](https://github.com/jaredhanson/passport-local).\n\nThis module lets you authenticate using a username and password in your Node.js\napplications.  By plugging into Passport, local authentication can be easily and\nunobtrusively integrated into any application or framework that supports\n[Connect](http://www.senchalabs.org/connect/)-style middleware, including\n[Express](http://expressjs.com/).\n\n## Install\n\n    $ npm install passport-http-header-token\n\n## Usage\n\n#### Configure Strategy\n\nThe http header token authentication strategy authenticates users using a token.\nThe strategy requires a `verify` callback, which accepts the\ncredential and calls `done` providing a user.\n\n    passport.use(new HTTPHeaderTokenStrategy(\n      function(token, done) {\n        User.findOne({ token: token }, function (err, user) {\n          if (err) { return done(err); }\n          if (!user) { return done(null, false); }\n          return done(null, user);\n        });\n      }\n    ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'http-header-token'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n    app.post('/login',\n      passport.authenticate('http-header-token', { failureRedirect: '/login' }),\n      function(req, res) {\n        res.redirect('/');\n      });\n\n## Examples\n\nFor a complete, working example, refer to the [HTTP Header Token example](https://github.com/peralmq/passport-http-header-token/tree/master/examples/http-header-token).\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-2014 Pelle Almquist\n","maintainers":[{"name":"peralmq","email":"per.almquist@gmail.com"}],"time":{"modified":"2022-06-23T12:46:39.664Z","created":"2014-10-28T17:33:27.970Z","1.0.0":"2014-10-28T17:33:27.970Z","1.1.0":"2016-06-17T09:12:03.732Z"},"homepage":"https://github.com/peralmq/passport-http-header-token#readme","keywords":["passport","auth","authn","authentication","header","token"],"repository":{"type":"git","url":"git://github.com/peralmq/passport-http-header-token.git"},"author":{"name":"Pelle Almquist","email":"per.almquist@gmail.com"},"bugs":{"url":"http://github.com/peralmq/passport-http-header-token/issues"},"readmeFilename":"README.md"}