@fastify/basic-auth
@fastify/basic-auth is an npm package that provides a Basic authentication plugin for the Fastify web framework. It calls a developer-supplied validate function on each request, passing the username, password, request, and reply, and accepts validation via a done callback, a promise, or async/await. Options include authenticate to add the WWW-Authenticate header with an optional realm, proxyMode to use Proxy-Authorization and 407 responses, and a header option to choose which header credentials come from. It is licensed under MIT.
npm / PyPI packages
Open source ↗