Skip to content

Commit

Permalink
Merge pull request #397 from opentable/fix-basicauth
Browse files Browse the repository at this point in the history
Fix basicAuth
  • Loading branch information
matteofigus authored Mar 8, 2017
2 parents b3006a0 + 7ac7be1 commit f4121b4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 6 additions & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"babel-core": "6.21.0",
"babel-loader": "6.2.10",
"babel-preset-env": "1.1.8",
"basic-auth-connect": "^1.0.0",
"body-parser": "^1.16.0",
"clean-css": "3.4.18",
"colors": "1.1.2",
Expand Down
6 changes: 3 additions & 3 deletions src/registry/domain/authentication.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
'use strict';

var path = require('path');
var basicAuth = require('basic-auth-connect');
var format = require('stringformat');
var path = require('path');

var strings = require('../../resources/');

Expand All @@ -15,8 +16,7 @@ var builtin = {
};
},
middleware: function(authConfig){
var express = require('express');
return express.basicAuth(authConfig.username, authConfig.password);
return basicAuth(authConfig.username, authConfig.password);
}
}
};
Expand Down

0 comments on commit f4121b4

Please sign in to comment.