Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blocktrail/superagent-http-signature
A plugin for superagent that signs requests using Joyent's Http Signature Scheme
https://github.com/blocktrail/superagent-http-signature
Last synced: 2 days ago
JSON representation
A plugin for superagent that signs requests using Joyent's Http Signature Scheme
- Host: GitHub
- URL: https://github.com/blocktrail/superagent-http-signature
- Owner: blocktrail
- Created: 2015-03-10T14:00:17.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-19T12:49:18.000Z (over 9 years ago)
- Last Synced: 2025-01-18T10:11:09.441Z (18 days ago)
- Language: JavaScript
- Size: 188 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# superagent-http-signature
A plugin for superagent that signs requests using Joyent's [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md).
Forked from [joyent/node-http-signature](https://github.com/joyent/node-http-signature) to be used with superagent.## Supported algorithms
- rsa-sha1
- rsa-sha256
- rsa-sha512
- dsa-sha1
- hmac-sha1
- hmac-sha256
- hmac-sha512## HMAC-only version
For usage with browserify using the `index-hmac-only.js` version is recommended because it's a lot smaller without all the other signing code included!## Installation
Install with [npm](http://npmjs.org):
```
$ npm install superagent-http-signature
```## Usage
```javascript
var superagent = require('superagent');
var superagentHttpSignature = require('superagent-http-signature');superagent
.get('http://www.example.com')
.use(superagentHttpSignature({
headers: ['(request-target)', 'content-md5'],
algorithm: 'hmac-sha256',
key: 'YOUR_KEY',
keyId: 'YOUR_SECRET'
}))
.end(function(err, res) {});
```