@voxpelli/passport-dummy
Passport strategy for dummy authentication. Fork of developmentseed/passport-dummy (due to critical PR:s not being merged).
Installation
$ npm install @voxpelli/passport-dummy
Usage
Configure Strategy
The dummy authentication strategy authenticates or denies all requests based on the 'allow' option passed to it.
passport.use(new DummyStrategy(
function(done) {
return done(null, {username: 'dummy'});
}
));
Authenticate Requests
Use passport.authenticate()
, specifying the 'dummy'
strategy, to
authenticate requests.
For example, as route middleware in an Express application:
app.post('/login',
passport.authenticate('dummy', { failureRedirect: '/login' }),
function(req, res) {
res.redirect('/');
});
Credits
License
(The MIT License)