1.0.0 • Published 7 years ago
@devpodio/htpasswd v1.0.0
@devpodio/htpasswd
- htpasswd utility to create,edit,view .htpasswd file
Usage
npm install @devpodio/htpasswd --saveoryarn add @devpodio/htpasswdconst HTPASSWD = require('@devpodio/htpasswd')const htpasswd = new HTPASSWD(options[Object])
Options
options.path- Absolute path to save the .htpasswd, defaults toprocess.env.HOMEorprocess.cwd()options.encryption- Type of encryption to use. Accepted values:bcrypt,sha1,md5,crypt,plain. Defaults tobcrypt
Api
addAdd a new user, passwordadd(user[String],password[String])editEdit a user with a new passwordedit(user[String],newpassword[String])deleteDelete a user from the listdelete(user[String])viewView the list of user and password =>returns [Object]
Cli
htpasswd [command] <options>htpasswd --helpfor more info
1.0.0
7 years ago