heroku-debug
Version:
debugging plugin for the CLI
22 lines (15 loc) • 511 B
Markdown
read/write htpasswd files
```js
npm install --save htpasswd-auth
```
```js
var htpasswd = require('htpasswd-auth');
var file = fs.readFileSync('./path-to-htpasswd');
htpasswd.authenticate('dickeyxxx', 'pass', file)
.then(function (auth) {
// auth is true if the password is valid
});
```