Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/interledger-deprecated/passport-http-signature
passport strategy for HTTP signatures
https://github.com/interledger-deprecated/passport-http-signature
Last synced: 5 days ago
JSON representation
passport strategy for HTTP signatures
- Host: GitHub
- URL: https://github.com/interledger-deprecated/passport-http-signature
- Owner: interledger-deprecated
- Created: 2015-11-05T21:04:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-18T21:17:50.000Z (almost 9 years ago)
- Last Synced: 2024-04-26T06:04:26.178Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 5
- Watchers: 14
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-starred - interledger-deprecated/passport-http-signature - passport strategy for HTTP signatures (others)
README
# passport-http-signature
> Passport strategy using HTTP Signatures
[![NPM Version][npm-image]][npm-url]
[![Linux Build][circle-image]][circle-url]
[![Test Coverage][coveralls-image]][coveralls-url]## Install
```bash
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](https://opensource.org/licenses/ISC)
[npm-image]: https://img.shields.io/npm/v/passport-http-signature.svg
[npm-url]: https://npmjs.org/package/passport-http-signature
[circle-image]: https://img.shields.io/circleci/project/interledger/passport-http-signature.svg
[circle-url]: https://circleci.com/gh/interledger/passport-http-signature
[coveralls-image]: https://img.shields.io/coveralls/interledger/passport-http-signature/master.svg
[coveralls-url]: https://coveralls.io/r/interledger/passport-http-signature?branch=master