This module is a JavaScript implementation of the XOAUTH2 SASL mechanism, which plugs into the SASL framework.
$ npm install sasl-xoauth2
$ volo add jaredhanson/js-sasl-xoauth2 sasl-xoauth2
For more information on using volo to manage JavaScript modules, visit http://volojs.org/.
Register the XOAUTH2 mechanism.
factory.use(require('sasl-xoauth2'));
Send an authentication response with necessary credentials.
var mech = factory.create(['XOAUTH2']);
var resp = mech.response({ username: '[email protected]', token: 'vF9dft4qmTc2Nvb3RlckBhdHRhdmlzdGEuY29tCg==' });
This module is AMD-compliant, and can be loaded by module loaders such as RequireJS.
This module is optimized for use with Anchor.
This module is compatible with Node.
To run tests in a browser, execute the Make target for the desired browser:
$ make test-chrome
$ make test-firefox
$ make test-safari
To run headless tests from a terminal using PhantomJS:
$ make test-phantomjs
To run tests in Node:
$ make test-node
Copyright (c) 2012 Jared Hanson <http://jaredhanson.net/>