http-auth
Advanced tools
Comparing version
@@ -30,23 +30,18 @@ // Generated by CoffeeScript 1.10.0 | ||
Base.prototype.isAuthenticated = function(req, callback) { | ||
var clientOptions, error, error1, header, searching; | ||
try { | ||
if (this.proxy) { | ||
header = req.headers["proxy-authorization"]; | ||
} else { | ||
header = req.headers["authorization"]; | ||
var clientOptions, header, searching; | ||
if (this.proxy) { | ||
header = req.headers["proxy-authorization"]; | ||
} else { | ||
header = req.headers["authorization"]; | ||
} | ||
if (header) { | ||
clientOptions = this.parseAuthorization(header); | ||
if (clientOptions) { | ||
searching = true; | ||
this.findUser(req, clientOptions, (function(_this) { | ||
return function(result) { | ||
return callback.apply(_this, [result]); | ||
}; | ||
})(this)); | ||
} | ||
if (header) { | ||
clientOptions = this.parseAuthorization(header); | ||
if (clientOptions) { | ||
searching = true; | ||
this.findUser(req, clientOptions, (function(_this) { | ||
return function(result) { | ||
return callback.apply(_this, [result]); | ||
}; | ||
})(this)); | ||
} | ||
} | ||
} catch (error1) { | ||
error = error1; | ||
console.error(error.message); | ||
} | ||
@@ -53,0 +48,0 @@ if (!searching) { |
{ | ||
"name": "http-auth", | ||
"description": "Node.js package for HTTP basic and digest access authentication.", | ||
"version": "2.3.6", | ||
"version": "2.3.7", | ||
"author": "Gevorg Harutyunyan (http://github.com/gevorg)", | ||
@@ -45,3 +45,3 @@ "maintainers": [ | ||
"scripts": { | ||
"test": "node ./node_modules/nodeunit/bin/nodeunit tests", | ||
"test": "node tests/runner.js", | ||
"prepublish": "rm -rf gensrc && node ./node_modules/coffee-script/bin/coffee --compile -o gensrc src", | ||
@@ -48,0 +48,0 @@ "pretest": "npm run prepublish" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
75221
2.27%56
3.7%704
2.03%5
25%