passport-endo-passthru
endo passthru authentication strategy for Passport
Last updated 4 years ago by octoblu .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install passport-endo-passthru 
SYNC missed versions from official npm registry.

passport-endo-passthru

Passport strategy to pass meshblu credentials through to endos that don't want to implement auth.

Install

$ npm install passport-anonymous

Usage

Configure Strategy

The endo-passthru authentication strategy passes authentication for a request, with req.user remaining undefined.

passport.use(new EndoPassthruStrategy());

Authenticate Requests

Use passport.authenticate(), specifying the 'endo-passthru' strategy, to pass authentication of a request. This is typically used with Octoblu endos for services that do not want to authenticate against a 3rd party service.

For example, as route middleware in an Express application:

app.post('/hello',
  passport.authenticate(['endo-passthru'], { session: false }),
  function(req, res) {
    if (req.user) {
      res.json({ uuid: req.user.uuid });
    } else {
      res.json({ uuid: null });
    }
  });

Current Tags

  • 1.1.0                                ...           latest (4 years ago)

2 Versions

  • 1.1.0                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |