1.0.0 • Published 5 years ago

passport-nonce v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

passport-nonce

Install

$ npm install passport-nonce

Usage

Configure Strategy

passport.use(new NonceStrategy({
  clientHeaderName: 'x-client-name',
  nonceHeaderName: 'x-nonce',
  tokenHeaderName: 'x-token',
  clientSecrets: {
    'client1': 'averysecretsharedsecret',
    'client2': 'averysecretsharedsecret'
  }
}))

Authenticate Requests

app.get('/judge',
  passport.authenticate('nonce'));