Expose middleware in library.
This commit is contained in:
parent
54b9bd1fff
commit
aff3ed9c44
2
index.js
2
index.js
|
@ -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;
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -79,4 +79,14 @@ describe('bitauth', function() {
|
|||
|
||||
});
|
||||
|
||||
describe('#middleware', function() {
|
||||
|
||||
it('should expose an express middleware', function(done) {
|
||||
bitauth.middleware( {} , {} , function() {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue