htpasswd-authenticator

1.0.2 • Public • Published

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

/htpasswd-authenticator/

    Package Sidebar

    Install

    npm i htpasswd-authenticator

    Weekly Downloads

    2

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    4.8 kB

    Total Files

    11

    Last publish

    Collaborators

    • jean.massat