"readme":"\n## Installation\n\n```sh\n$ npm install sinopia\n$ npm install sinopia-htpasswd\n```\n\nPS: Actually, this module is bundled with sinopia, so you don't have to install it like this. But with other auth plugins you have to.\n\n## Config\n\nAdd to your `config.yaml`:\n\n```yaml\nauth:\n htpasswd:\n users_file: ./htpasswd\n\n # Maximum amount of users allowed to register, defaults to \"+inf\".\n # You can set this to 0 to disable registration.\n #max_users: 1000\n```\n\n## For plugin writers\n\nIt's called as:\n\n```js\nrequire('sinopia-htpasswd')(config, stuff)\n```\n\nWhere:\n\n - config - module's own config\n - stuff - collection of different internal sinopia objects\n - stuff.config - main config\n - stuff.logger - logger\n\nThis should export two functions:\n\n - `adduser(user, password, cb)`\n \n It should respond with:\n - `cb(err)` in case of an error (error will be returned to user)\n - `cb(null, false)` in case registration is disabled (next auth plugin will be executed)\n - `cb(null, true)` in case user registered successfully\n \n It's useful to set `err.status` property to set http status code (e.g. `err.status = 403`).\n\n - `authenticate(user, password, cb)`\n \n It should respond with:\n - `cb(err)` in case of a fatal error (error will be returned to user, keep those rare)\n - `cb(null, false)` in case user not authenticated (next auth plugin will be executed)\n - `cb(null, [groups])` in case user is authenticated\n \n Groups is an array of all users/usergroups this user has access to. You should probably include username itself here.\n \n",