passport-http-signature

    1.0.0 • Public • Published

    passport-http-signature

    Passport strategy using HTTP Signatures

    NPM Version Linux Build Test Coverage

    Install

    npm install --save passport-http-signature

    Usage

    Configure Strategy

    passport.use(new HTTPSignatureStrategy(
      function (username, done) {
        User.findById(username, function(err, user) {
          if (err) return done(err)
          if (!user) return done()
          done(null, user, user.public_key)
        })
      }))
    

    Authenticate Requests

    app.get('/private',
      passport.authenticate('http-signature'),
      function(req, res) {
        res.json(req.user)
      })
    

    License

    MIT

    Keywords

    Install

    npm i passport-http-signature

    DownloadsWeekly Downloads

    2

    Version

    1.0.0

    License

    ISC

    Last publish

    Collaborators

    • interledger