{ "name" : "sinopia-htpasswd", "version" : "0.4.4", "description" : "auth plugin for sinopia supporting htpasswd format", "author" : { "name": "Alex Kocharin" , "email": "alex@kocharin.ru" }, "repository" : { "type": "git" , "url": "git://github.com/rlidwka/sinopia-htpasswd" }, "optionalDependencies": { "crypt3": ">=0.1.5 <1.0.0-0" , "fs-ext": "*" }, "devDependencies" : { "mocha": ">=1.17.0 <2.0.0-0" }, "scripts" : { "test": "mocha ./tests" }, "keywords" : [ "sinopia", "auth", "plugin", "htpasswd" ], "publishConfig" : { "registry": "https://registry.npmjs.org/" }, "license" : { "type": "WTFPL" , "url": "http://www.wtfpl.net/txt/copying/" }, "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", "readmeFilename" : "README.md", "bugs" : { "url": "https://github.com/rlidwka/sinopia-htpasswd/issues" }, "homepage" : "https://github.com/rlidwka/sinopia-htpasswd", "dependencies" : { "crypt3": ">=0.1.5 <1.0.0-0", "fs-ext": "*" }, "_id" : "sinopia-htpasswd@0.4.4", "_shasum" : "f4b3f4da2b7869fcd1e2a631aa7eb26a380a560d", "_from" : "sinopia-htpasswd@>= 0.4.3" }