Dummy authentication strategy for Passport
JavaScript
Pull request Compare This branch is even with developmentseed:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/passport-dummy
LICENSE
package.json
readme.md

readme.md

Passport-Dummy

Passport strategy for dummy authentication.

Installation

$ npm install 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)