Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

basic-auth-connect

Package Overview
Dependencies
Maintainers
6
Versions
2
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

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
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 30 Sep 2024

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