passport-dummy

0.0.1 • Public • Published

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)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.1133latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.1133

Package Sidebar

Install

npm i passport-dummy

Weekly Downloads

133

Version

0.0.1

License

none

Last publish

Collaborators

  • arossouw