passport-echosign
Adobe Echosign authentication strategy for Passport.
Last updated 6 years ago by joewoodhouse .
BSD · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install passport-echosign 
SYNC missed versions from official npm registry.

Passport-EchoSign

Passport strategy for authenticating with EchoSign using the OAuth 2.0 API.

This module lets you authenticate using EchoSign in your Node.js applications. By plugging into Passport, EchoSign authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.

Usage

Configure Strategy

The EchoSign authentication strategy authenticates users using a EchoSign account and OAuth 2.0 tokens. The strategy requires a verify callback, which accepts these credentials and calls done providing a user, as well as options specifying a app ID, app secret, and callback URL.

passport.use(new EchoSignStrategy({
    clientID: ECHOSIGN_APP_ID,
    clientSecret: ECHOSIGN_APP_SECRET,
    callbackURL: "http://localhost:3000/auth/echosign/callback"
  }, function (accessToken, refreshToken, profile, done) {
// store credentials, etc
    });
  }
));

Authenticate Requests

Use passport.authenticate(), specifying the 'echosign' strategy, to authenticate requests.

For example, as route middleware in an Express application:

app.get('/auth/echosign', passport.authenticate('echosign'));

app.get('/auth/echosign/callback',
  passport.authenticate('echosign', { failureRedirect: '/login' }),
  function(req, res) {
    // Successul authentication, redirect home.
    res.redirect('/');
  });

Credits

Created by Joe Woodhouse

Code based on passport-mailchimp by Brian Falk

License

The MIT License

Current Tags

  • 0.0.2                                ...           latest (6 years ago)

2 Versions

  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |