{"library":"basicauth-middleware","type":"library","category":null,"description":"basicauth-middleware is an Express.js middleware designed for implementing HTTP Basic Authentication on web routes. Currently at version 3.1.1, the package is in a maintenance state, with the last major update (v3) occurring in 2021 which dropped support for Node.js versions below 10 and enhanced asynchronous credential checking. It allows for flexible authentication strategies, accepting plain username/password pairs, arrays of credentials, or custom synchronous/asynchronous callback functions, including Promise-based and async/await syntax. This middleware is suitable for protecting administrative interfaces, APIs, or internal tools where a simple, stateless authentication mechanism is sufficient. Key differentiators include its simplicity and versatility in defining authentication logic directly within the application.","language":"javascript","status":"maintenance","version":"3.1.1","tags":["javascript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install basicauth-middleware","imports":["const basicauth = require('basicauth-middleware');","const basicauth = require('basicauth-middleware');","app.use(basicauth('user', 'pass'));"]},{"cmd":"yarn add basicauth-middleware","imports":[]},{"cmd":"pnpm add basicauth-middleware","imports":[]}],"homepage":null,"github":"https://github.com/nchaulet/basicauth-middleware","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/basicauth-middleware","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/basicauth-middleware/compatibility"}}