1.0.0 • Published 6 years ago

simple-htpasswd-auth v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

htpasswd-auth Build Status

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
  })