Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Dummy authentication strategy for Passport
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/passport-dummy Initial commit of dummy authentication module.
LICENSE
package.json fix the author in 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)

Something went wrong with that request. Please try again.