(username, password)
| 38 | assert(typeof authorizer == 'function', 'Expected a function for the basic auth authorizer, found ' + typeof authorizer + ' instead') |
| 39 | |
| 40 | function staticUsersAuthorizer(username, password) { |
| 41 | for(var i in users) |
| 42 | if(safeCompare(username, i) & safeCompare(password, users[i])) |
| 43 | return true |
| 44 | |
| 45 | return false |
| 46 | } |
| 47 | |
| 48 | return function authMiddleware(req, res, next) { |
| 49 | var authentication = auth(req) |
nothing calls this directly
no test coverage detected
searching dependent graphs…