Socket
Socket
Sign inDemoInstall

basic-auth-connect

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basic-auth-connect

Basic auth middleware for node and connect


Version published
Weekly downloads
509K
decreased by-16.38%
Maintainers
1
Weekly downloads
 
Created

What is basic-auth-connect?

The basic-auth-connect npm package is a simple middleware for Node.js that provides basic HTTP authentication. It is typically used with the Connect framework or Express.js to protect routes with basic authentication.

What are basic-auth-connect's main functionalities?

Basic Authentication Middleware

This feature allows you to protect routes with basic HTTP authentication. The middleware checks the provided username and password against the specified credentials and grants access if they match.

const connect = require('connect');
const basicAuth = require('basic-auth-connect');

const app = connect();

app.use(basicAuth('username', 'password'));

app.use((req, res) => {
  res.end('Authenticated!');
});

app.listen(3000, () => {
  console.log('Server running on port 3000');
});

Other packages similar to basic-auth-connect

FAQs

Package last updated on 08 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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