{"repo":"fastify/fastify-basic-auth","free":true,"listed":false,"github":"https://github.com/fastify/fastify-basic-auth","clone":"git clone https://github.com/fastify/fastify-basic-auth.git","description":"Fastify Basic auth plugin","language":"JavaScript","stars":93,"topics":["fastify","authentication","basic","fastify-plugin"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"@fastify/basic-auth A simple Basic auth plugin for Fastify. ## Install Compatibility Plugin version Fastify version --------------- ----------------- =6.x ^5.x ^4.x ^4.x =1.x (optional, default: true) User-ids or passwords with non-US-ASCII characters may cause issues unless both parties agree on the encoding scheme. Setting utf8 to true sends the 'charset' parameter to prefer \"UTF-8\", increasing the likelihood that clients will use that encoding. strictCredentials (optional, default: true) Setting strictCredentials to false allows additional whitespaces at the beginning, middle, and end of the authorization header. This is a fallback option to ensure the same behavior as @fastify/basic-auth version (required) The validate function is called on each request made and is passed the username , password , req , and reply parameters, in that order. An optional fifth parameter, done , can be used to signify a valid request when called with no arguments or an invalid request when called with an Error object. Alternatively, the validate function can return a promise, resolving for valid requests and rejecting for invalid. This can also be achieved using an async/await function, and throwing for invalid requests. See code above for examples. authenticate (optional, default: false) The authenticate option adds the WWW-Authenticate header and can set the realm value. This can trigger client-side authentication interfaces, such as the browser authentication dialog. Setting authenticate t","default_branch":null,"files":null,"tree":[],"storefront":"/r/fastify","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fastify/fastify-basic-auth/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}