Expose middleware in library.

This commit is contained in:
Eric Martindale 2014-06-29 18:01:41 -04:00
parent 54b9bd1fff
commit aff3ed9c44
3 changed files with 16 additions and 2 deletions

View File

@ -4,6 +4,6 @@ var bitauth = require('./lib/bitauth');
// add node-specific encrypt/decrypt
bitauth.encrypt = require('./lib/encrypt');
bitauth.decrypt = require('./lib/decrypt');
bitauth.middleware = require('./lib/middleware/bitauth');
module.exports = bitauth;

View File

@ -6,6 +6,10 @@
"email": "patrick@bitpay.com"
},
"contributors": [
{
"name": "Eric Martindale",
"email": "eric@ericmartindale.com"
},
{
"name": "Gordon Hall",
"email": "gordon@bitpay.com"
@ -13,7 +17,7 @@
],
"scripts": {
"make-dist": "sh scripts/make-dist.sh",
"test": "node_modules/.bin/mocha test/* --reporter spec",
"test": "mocha test/* --reporter spec",
"postinstall": "npm run make-dist"
},
"main": "index.js",

View File

@ -79,4 +79,14 @@ describe('bitauth', function() {
});
describe('#middleware', function() {
it('should expose an express middleware', function(done) {
bitauth.middleware( {} , {} , function() {
done();
});
});
});
});