Socket
Socket
Sign inDemoInstall

connect

Package Overview
Dependencies
Maintainers
0
Versions
234
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

2

lib/connect.js

@@ -29,3 +29,3 @@

exports.version = '1.2.1';
exports.version = '1.2.2';

@@ -32,0 +32,0 @@ /**

@@ -21,6 +21,9 @@

* method is provided as well, invoking `callback(user, pass, callback)`. Populates
* `req.remoteUser`.
* `req.remoteUser`. The final alternative is simply passing username / password
* strings.
*
* Examples:
*
* connect(connect.basicAuth('username', 'password'));
*
* connect(

@@ -38,3 +41,3 @@ * connect.basicAuth(function(user, pass){

*
* @param {Function} callback
* @param {Function|String} callback or username
* @param {String} realm

@@ -45,2 +48,14 @@ * @api public

module.exports = function basicAuth(callback, realm) {
var username, password;
// user / pass strings
if ('string' == typeof callback) {
username = callback;
password = realm;
if ('string' != typeof password) throw new Error('password argument required');
callback = function(user, pass){
return user == username && pass == password;
}
}
realm = realm || 'Authorization Required';

@@ -47,0 +62,0 @@

@@ -47,3 +47,3 @@

module.exports = function errorHandler(options){
exports = module.exports = function errorHandler(options){
options = options || {};

@@ -72,2 +72,3 @@

.replace('{stack}', stack)
.replace('{title}', exports.title)
.replace(/\{error\}/g, err.toString());

@@ -97,1 +98,7 @@ res.setHeader('Content-Type', 'text/html');

};
/**
* Template title.
*/
exports.title = 'Connect';
{
"name": "connect",
"version": "1.2.1",
"version": "1.2.2",
"description": "High performance middleware framework",

@@ -5,0 +5,0 @@ "keywords": ["framework", "web", "middleware", "connect", "rack"],

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc