Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

82 lines (46 sloc) 1.948 kb

SASL : DIGEST-MD5

This module is a JavaScript implementation of the DIGEST-MD5 SASL mechanism, which plugs into the SASL framework.

Install

npm
$ npm install sasl-digest-md5
volo
$ volo add jaredhanson/js-sasl-digest-md5 sasl-digest-md5

For more information on using volo to manage JavaScript modules, visit http://volojs.org/.

Usage

Register the DIGEST-MD5 mechanism.

factory.use(require('sasl-digest-md5'));

Send an authentication response with necessary credentials.

var mech = factory.create(['DIGEST-MD5']);
var resp = mech.challenge('realm="elwood.innosoft.com",nonce="OA6MG9tEQGm2hh",qop="auth",algorithm=md5-sess,charset=utf-8')
               .response({ username: 'chris', password: 'secret', host: 'elwood.innosoft.com', serviceType: 'imap' });

Compatibility

Browser

This module is AMD-compliant, and can be loaded by module loaders such as RequireJS.

This module is optimized for use with Anchor.

Node

This module is compatible with Node.

Tests

Browser

To run tests in a browser, execute the Make target for the desired browser:

$ make test-chrome
$ make test-firefox
$ make test-safari
PhantomJS

To run headless tests from a terminal using PhantomJS:

$ make test-phantomjs
Node

To run tests in Node:

$ make test-node
Status

Travis CI

Credits

License

The MIT License

Copyright (c) 2012 Jared Hanson <http://jaredhanson.net/>

Jump to Line
Something went wrong with that request. Please try again.