Skip to content

jdx/htpasswd-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

htpasswd-auth Circle CI

read/write htpasswd files

Setup

npm install --save htpasswd-auth

Checking if a password is valid

var htpasswd = require('htpasswd-auth');
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
});

About

read/write htpasswd files for node

Resources

Stars

Watchers

Forks

Packages

No packages published