{"_id":"@cafrotos/passport-local","_rev":"4-c8f852df9b7a05fb07736494618ef5e2","name":"@cafrotos/passport-local","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@cafrotos/passport-local","version":"1.0.0","description":"Local username and password authentication strategy for Passport.","keywords":["passport","local","auth","authn","authentication","username","password"],"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-local.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-local/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/jaredhanson"},"license":"MIT","licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"passport-strategy":"1.x.x"},"devDependencies":{"make-node":"0.4.6","mocha":"2.x.x","chai":"2.x.x","chai-passport-strategy":"0.1.x"},"engines":{"node":">= 0.4.0"},"scripts":{"test":"make test"},"gitHead":"8d2b80b5414e0dbcfd8915e7e950c528ca2e1189","homepage":"https://github.com/jaredhanson/passport-local#readme","_id":"@cafrotos/passport-local@1.0.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-o/l/XByb2RK4qaygdHPokzDnnyQJbSXBbWBYV6yC1rvcFHcIz9Ozr2qgXwEJ9Nif6RAlKu4bk4AJs3Yq5WUSMw==","shasum":"caf61d256f3ddf39abfb1c3882a30f6653c3b168","tarball":"https://registry.npmjs.org/@cafrotos/passport-local/-/passport-local-1.0.0.tgz","fileCount":7,"unpackedSize":10585,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClCfbV7EiH62Ds+JnmrFP+Vi/524+8ZENOJFD4NL+dpwIhAKTe9nLEYbIQ6cVotxka3pKTL1GsrXfhTVoKqbqGhpE0"}]},"_npmUser":{"name":"cafrotos","email":"hotanhiu.99@gmail.com"},"directories":{},"maintainers":[{"name":"cafrotos","email":"hotanhiu.99@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-local_1.0.0_1636482531395_0.046537091042472944"},"_hasShrinkwrap":false},"1.0.1":{"name":"@cafrotos/passport-local","version":"1.0.1","description":"Local username and password authentication strategy for Passport.","keywords":["passport","local","auth","authn","authentication","username","password"],"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-local.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-local/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/jaredhanson"},"license":"MIT","licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"passport-strategy":"1.x.x"},"devDependencies":{"make-node":"0.4.6","mocha":"2.x.x","chai":"2.x.x","chai-passport-strategy":"0.1.x"},"engines":{"node":">= 0.4.0"},"scripts":{"test":"make test"},"gitHead":"8d2b80b5414e0dbcfd8915e7e950c528ca2e1189","homepage":"https://github.com/jaredhanson/passport-local#readme","_id":"@cafrotos/passport-local@1.0.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-3V9myis9/DfcsxWM/4KMZ0wuAEAQ2yqsk+VSCFzjTJ0uaNtysZUSIwvEgeeFcaPqyM0l2dFdUXpY1Xeez82b/w==","shasum":"7552707507109d7f2494ab26777ca17004b553c0","tarball":"https://registry.npmjs.org/@cafrotos/passport-local/-/passport-local-1.0.1.tgz","fileCount":7,"unpackedSize":10596,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrF6Jrck/7/5IFsOkt48Qx+befDT1Sb9GaSWKxEtxrtAIgOAIJ7C9R1M25PYKOXyL4DF6WEltyykf7GRDwOW5+5wU="}]},"_npmUser":{"name":"cafrotos","email":"hotanhiu.99@gmail.com"},"directories":{},"maintainers":[{"name":"cafrotos","email":"hotanhiu.99@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-local_1.0.1_1636485324099_0.1455836255720333"},"_hasShrinkwrap":false},"1.0.2":{"name":"@cafrotos/passport-local","version":"1.0.2","description":"Local username and password authentication strategy for Passport.","keywords":["passport","local","auth","authn","authentication","username","password"],"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-local.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-local/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/jaredhanson"},"license":"MIT","licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"passport-strategy":"1.x.x"},"devDependencies":{"make-node":"0.4.6","mocha":"2.x.x","chai":"2.x.x","chai-passport-strategy":"0.1.x"},"engines":{"node":">= 0.4.0"},"scripts":{"test":"make test"},"gitHead":"8d2b80b5414e0dbcfd8915e7e950c528ca2e1189","homepage":"https://github.com/jaredhanson/passport-local#readme","_id":"@cafrotos/passport-local@1.0.2","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-2TMjizd0fXFRoNm7x/I/pF0OiqyoXhC7qvjOPvmBqWhimI7n+XOwWdaIHu63CzWmmA5Cb+5ESxqGEpXcPi+geA==","shasum":"7ee5e39a9eb4b982a19ddcdc18548b5da26c3ae2","tarball":"https://registry.npmjs.org/@cafrotos/passport-local/-/passport-local-1.0.2.tgz","fileCount":7,"unpackedSize":10624,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzavdCRA9TVsSAnZWagAAEa0P/A65Hz9LQn3FnFAdUp5w\nGDlvqETzNsbV1n5H5sRO1kB0xrIvAwxaDqzmmHXfS9y5o+G/7mdIHoXmdu9j\nt/kOkDvFwvu9Vf95n4ZaQK2D/xVWI19OSGPf5lYISqQooUbqh0XzM1aZgowH\nJGgp7VxXY190FB9KK+XxwbUcygCLGIZQTwuxUDxjmmoWS4v8pUsDncRmigsX\nAk0126l9fuHn/7szNM1A47rI8jm4b/rCorpr5fHLuGBi836YLCdiAM45ofkE\n2fo5qSF6CKE8RPgOOHc+rVnoWr248ySaG/+AR3B38i9EWc1o+Gy0LYSw2XIc\nU/CzQ1N9diTbSkkZ+KOFP/64o4BWvwiunat0G0JcTay83oQR/oJ1Oa0J5A1i\n8Ea5SZ6SsdiJLebCX0OHzyrXtKi9RVP0rfHQjV2Nu7tDu5aP7l2sl3D4BA/4\nXmHMFTKFf7+mKO9dYXlvDjM3m4N8NBlwZhpEGqOhrXwje0CG1n3GV0fKCH0b\nWWu+z4WagY6oMOxwAuts98w8OYAhOQgmXSlaC37lvmFDT03uAF39a2jNWCh5\nC5bMVtPBmAngM4YY8BrrtBUnRGww3ddFelCqkJoViszF4Sw3SaQX/jdLtuTN\nFkDA34iqEVSHGCDryFa1nK7gMhf1VupEZB9Q63Dg98I2PaIiB+ry/OZgVGdS\ntATs\r\n=lsia\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFhGqW2LlB0nf/yZI+HszOpD+bxeW7IPqStwwxQUmH3DAiBqyClplkVDz+AtcPqWahxKXPZVwxfzVFHtdXrJZfnU8w=="}]},"_npmUser":{"name":"cafrotos","email":"hotanhiu.99@gmail.com"},"directories":{},"maintainers":[{"name":"cafrotos","email":"hotanhiu.99@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-local_1.0.2_1636485383136_0.256533131798786"},"_hasShrinkwrap":false}},"time":{"created":"2021-11-09T18:28:51.356Z","1.0.0":"2021-11-09T18:28:51.522Z","modified":"2022-04-04T21:30:37.381Z","1.0.1":"2021-11-09T19:15:24.353Z","1.0.2":"2021-11-09T19:16:23.283Z"},"maintainers":[{"name":"cafrotos","email":"hotanhiu.99@gmail.com"}],"description":"Local username and password authentication strategy for Passport.","homepage":"https://github.com/jaredhanson/passport-local#readme","keywords":["passport","local","auth","authn","authentication","username","password"],"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-local.git"},"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"bugs":{"url":"http://github.com/jaredhanson/passport-local/issues"},"license":"MIT","readme":"# @cafrotos/passport-local\n\n## This module is forked from passport-local and has added refreshToken field\n\n[Passport](http://passportjs.org/) strategy for authenticating with a username\nand password.\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---\n\n<p align=\"center\">\n  <sup>Advertisement</sup>\n  <br>\n  <a href=\"https://www.tkqlhce.com/click-8907558-13433666?sid=cuHsLFjXqeyT2iHbYYaHMuw\" target=\"_top\">1Password, the only password manager you should trust.</a> Industry-leading security and award winning design.\n</p>\n\n---\n\n[![npm](https://img.shields.io/npm/v/passport-local.svg)](https://www.npmjs.com/package/passport-local)\n[![build](https://img.shields.io/travis/jaredhanson/passport-local.svg)](https://travis-ci.org/jaredhanson/passport-local)\n[![coverage](https://img.shields.io/coveralls/jaredhanson/passport-local.svg)](https://coveralls.io/github/jaredhanson/passport-local)\n[...](https://github.com/jaredhanson/passport-local/wiki/Status)\n\n## Install\n\n```bash\n$ npm install passport-local\n```\n\n## Usage\n\n#### Configure Strategy\n\nThe local authentication strategy authenticates users using a username and\npassword.  The strategy requires a `verify` callback, which accepts these\ncredentials and calls `done` providing a user.\n\n```js\npassport.use(new LocalStrategy(\n  function(username, password, refreshToken, done) {\n    User.findOne({ username: username }, function (err, user) {\n      if (err) { return done(err); }\n      if (!user) { return done(null, false); }\n      if (!user.verifyPassword(password)) { return done(null, false); }\n      return done(null, user);\n    });\n  }\n));\n```\n\n##### Available Options\n\nThis strategy takes an optional options hash before the function, e.g. `new LocalStrategy({/* options */, callback})`.\n\nThe available options are:\n\n* `usernameField` - Optional, defaults to 'username'\n* `passwordField` - Optional, defaults to 'password'\n* `refreshTokenField` - Optional, defaults to 'refreshToken'\n\nBoth fields define the name of the properties in the POST body that are sent to the server.\n\n#### Parameters\n\nBy default, `LocalStrategy` expects to find credentials in parameters\nnamed username and password. If your site prefers to name these fields\ndifferently, options are available to change the defaults.\n\n    passport.use(new LocalStrategy({\n        usernameField: 'email',\n        passwordField: 'passwd',\n        session: false\n      },\n      function(username, password, done) {\n        // ...\n      }\n    ));\n\nWhen session support is not necessary, it can be safely disabled by\nsetting the `session` option to false.\n\nThe verify callback can be supplied with the `request` object by setting\nthe `passReqToCallback` option to true, and changing callback arguments\naccordingly.\n\n    passport.use(new LocalStrategy({\n        usernameField: 'email',\n        passwordField: 'passwd',\n        passReqToCallback: true,\n        session: false\n      },\n      function(req, username, password, done) {\n        // request object is now first argument\n        // ...\n      }\n    ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'local'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n```js\napp.post('/login', \n  passport.authenticate('local', { failureRedirect: '/login' }),\n  function(req, res) {\n    res.redirect('/');\n  });\n```\n\n## Examples\n\n* [express-4.x-local-example](https://github.com/passport/express-4.x-local-example)\n\n  Illustrates how to use the password strategy within an [Express](https://expressjs.com)\n  application.\n\nAdditional examples can be found on the [wiki](https://github.com/jaredhanson/passport-local/wiki/Examples).\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2011-2015 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>\n","readmeFilename":"README.md"}