htpasswd-authenticator
v1.0.2
Published
authenticate with htpasswd files for node 8+
Downloads
33
Readme
htpasswd-authenticator
Forked from dickeyxxx's htpasswd-auth This fork contains updated hash node modules which allows usage for node >8
read/write htpasswd files
Setup
npm install --save htpasswd-authenticator
Checking if a password is valid
var htpasswd = require('htpasswd-authenticator');
var file = fs.readFileSync('./path-to-htpasswd', 'utf-8');
htpasswd.authenticate('dickeyxxx', 'pass', file)
.then(function (auth) {
// auth is true if the password is valid
});