simple-htpasswd-auth
v1.0.0
Published
authenticate with htpasswd files
Downloads
4
Readme
htpasswd-auth
read/write htpasswd files
Setup
npm install --save simple-htpasswd-auth
Checking if a password is valid
const htpasswd = require('htpasswd-auth')
const file = fs.readFileSync('./path-to-htpasswd')
htpasswd.authenticate('username', 'password', file)
.then(function (auth) {
// auth is true if the password is valid
})