authentication
This commit is contained in:
parent
98b822f168
commit
722e7b6107
@ -13,7 +13,6 @@ var router = express.Router();
|
||||
|
||||
var EventEmitter = require('events');
|
||||
|
||||
var authentication =require('basic-authentication')();
|
||||
|
||||
var authOptions = {
|
||||
hash: 'sha256', // type of hash
|
||||
@ -21,6 +20,9 @@ var authOptions = {
|
||||
suppress: true // suppress throwing Error if wrong user
|
||||
};
|
||||
|
||||
var authentication =require('basic-authentication')(authOptions);
|
||||
|
||||
|
||||
var nano = require('nano')('http://martind2000:1V3D4m526i@localhost:5984');
|
||||
var busEmitter = new EventEmitter();
|
||||
|
||||
@ -52,7 +54,7 @@ var doInsertLog = (obj) =>{
|
||||
busEmitter.on('saveLog', doInsertLog);
|
||||
|
||||
|
||||
router.get('/', authentication(authOptions), function (req, res) {
|
||||
router.get('/', authentication, function (req, res) {
|
||||
logger.debug('list..');
|
||||
|
||||
dbCouch.view('body','body',function(err, body) {
|
||||
|
Loading…
Reference in New Issue
Block a user