{"_id":"@draadnl/passport-url","name":"@draadnl/passport-url","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.4":{"name":"@draadnl/passport-url","version":"1.0.4","description":"Url authentication strategy for Passport.","keywords":["passport","url","auth","authn","authentication"],"author":{"email":"erik.vandeven@fresh-fruit.com","url":"Erik van de Ven"},"repository":{"type":"git","url":"git://github.com/freshfruitdigital/passport-url.git"},"bugs":{"url":"http://github.com/freshfruitdigital/passport-url/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"},"_id":"@draadnl/passport-url@1.0.4","gitHead":"e23c9bc81f8dd7a9690dbdb9b5466728eff097c8","homepage":"https://github.com/freshfruitdigital/passport-url#readme","_nodeVersion":"22.5.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-raUrsqJ4nKRI3bRJNz9KXoRkq2fhr9jCkYldCoMAVTwkDXIuBKXRYG68yw3FFNamVicA0fwmgF0tw1q8j7dofg==","shasum":"d770dd00dbc467c7e6dd5711f8e844f0845d7c37","tarball":"https://registry.npmjs.org/@draadnl/passport-url/-/passport-url-1.0.4.tgz","fileCount":6,"unpackedSize":7557,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDEuBIPfkNUgDT5KOShVN4M/OOSW+rtA9wNy070BGFs6AIhAJwL2ypPEDdTpuhOwbfwHu0ZXkflj6/+hh/mC1VKNW/d"}]},"_npmUser":{"name":"rudidraad","email":"rudi@draad.nl"},"directories":{},"maintainers":[{"name":"stijnvandervegt","email":"stijnvandervegt@gmail.com"},{"name":"rudidraad","email":"rudi@draad.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/passport-url_1.0.4_1746604851389_0.8143001555994438"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-07T08:00:51.288Z","1.0.4":"2025-05-07T08:00:51.567Z","modified":"2025-05-07T08:00:51.843Z"},"maintainers":[{"name":"stijnvandervegt","email":"stijnvandervegt@gmail.com"},{"name":"rudidraad","email":"rudi@draad.nl"}],"description":"Url authentication strategy for Passport.","homepage":"https://github.com/freshfruitdigital/passport-url#readme","keywords":["passport","url","auth","authn","authentication"],"repository":{"type":"git","url":"git://github.com/freshfruitdigital/passport-url.git"},"author":{"email":"erik.vandeven@fresh-fruit.com","url":"Erik van de Ven"},"bugs":{"url":"http://github.com/freshfruitdigital/passport-url/issues"},"readme":"# passport-url\n\n<!-- [![Build](https://travis-ci.org/jaredhanson/passport-local.png)](https://travis-ci.org/jaredhanson/passport-local)\n[![Coverage](https://coveralls.io/repos/jaredhanson/passport-local/badge.png)](https://coveralls.io/r/jaredhanson/passport-local)\n[![Quality](https://codeclimate.com/github/jaredhanson/passport-local.png)](https://codeclimate.com/github/jaredhanson/passport-local)\n[![Dependencies](https://david-dm.org/jaredhanson/passport-local.png)](https://david-dm.org/jaredhanson/passport-local)\n[![Tips](http://img.shields.io/gittip/jaredhanson.png)](https://www.gittip.com/jaredhanson/)\n -->\n\n[Passport](http://passportjs.org/) strategy for authenticating by url.\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-url\n\n## Usage\n\n#### Configure Strategy\n\nThe url authentication strategy authenticates users using an url hash.\nThe strategy requires a `verify` callback, which accepts these\ncredentials and calls `done` providing a user.\n\n    passport.use(new UrlStrategy(\n      function(url, done) {\n        User.findOne({ hash: url }, 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 `'url'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n    // :url contains the hash\n    app.get('/login/:url',\n      passport.authenticate('url', { failureRedirect: '/login' }),\n      function(req, res) {\n        res.redirect('/');\n      });\n\n<!-- ## Examples\n\nFor complete, working examples, refer to the multiple [examples](https://github.com/jaredhanson/passport-local/tree/master/examples) included.\n\n## Tests\n\n    $ npm install\n    $ npm test -->\n\n## Credits\n\n  - [Fresh Fruit Digital](https://github.com/freshfruitdigital)\n  - [Erik v/d Ven](https://github.com/ErikvdVen)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n","readmeFilename":"README.md","_rev":"1-86f85d4be89433076a0f945212e47002"}