Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
hmac signature for node
CoffeeScript JavaScript
branch: master

Merge pull request #2 from travis4all/clean

The repo your repo could be like!
latest commit caa429f917
@cloudify authored
Failed to load latest commit information.
test
.travis.yml
LICENSE
README.md
auth_hmac.coffee
auth_hmac.js
package.json

README.md

build status

AuthHMAC -- HMAC signing for Node HTTP

Install

  npm install authhmac

Or from source:

  git clone git://github.com/cloudify/node-authhmac.git
  cd node-authhmac
  npm link

Super simple to use

AuthHmac provides HMAC signing for Node HTTP requests, it has been inspired by the Ruby AuthHMAC gem: https://github.com/seangeo/auth-hmac

var authhmac = require('authhmac');

var key = 'my hmac key';
var secret = 'my hmac secret'; 

http_options = {
  host: 'test.com',
  port: 80,
  path: '/api',
  method: 'POST',
  headers: {
    'Content-Type': 'multipart/form-data'
  }
};

authhmac.sign(http_options, key, secret);

var req = http.request(http_options, function(res) {
  // ...
});
Something went wrong with that request. Please try again.