{"bugs":{"url":"https://github.com/Jackthomsonn/X-Auth/issues"},"dist":{"shasum":"d4e47619c9a940a4cd8339b1d85750dfd6c50b48","tarball":"https://registry.npmjs.org/x-auth-plugin/-/x-auth-plugin-0.0.3-beta.tgz","fileCount":21,"integrity":"sha512-7lYzJFu64anDuaLthlXhpk7FVya49nr9IoxalhbJy67rDgmrt00YgJ4RCZ1IzgA+1nKRpKs2xXhAZW0cSpEjeA==","signatures":[{"sig":"MEUCIC6r8TjBii1W3IN1onKRv13bDWynmUxRdg37SLUTOwYWAiEArBoGKc4g9S2x5/7AKYVZeFfqf4BGYEXiOi25uXow69c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbC96tCRA9TVsSAnZWagAAOOMQAIk078xQ3JqjkO9Q5Yhm\nV5LJqbUI1sAWBS9EoEwND3rzOCCyrlCV/K99Yl1/TI5+u4fGW4D56O2TZ1XF\nAStVwH6zJBsa2PyAHfwFMo2wbFo+UqGNE7LhCUdjsHywjxmrxPBi2RJaDlLl\nS+TA0TV+cTXMQEmTJgSLBlZD+mHRijBtzcUw2/nhgAyS26rxmpU498X216o0\nSXX553NaabeqCFFS+qygztyoJsKaWejgKNclTetnzjfxLCTQi6k4NKK5bnAl\nWBVvaIAJ6qWq/yWAGVVzW3OHhB0jkSuQOP16HMoIJOphZjzrtrsgZdHv0vy6\nM9EDJwYQen3x4gCGSjPO4TLTnczr8hFbqXNR8vHkIkh/YI9T3znsFLFI5eQa\nmHZ19e0PT7/8lII3Ojc638ms8Cev+4qPl9XiFki+tmGxBIxZJIazIMfTcvFh\nAUloXwkHhnyDOsXYnm1++xIcMA9isvX/aW3pdtNsle2D2G/G+N/ZDx9cv3HX\njf3g95yepYIDwZiOp+ybropumRVdM4u/NvZq+cG3Yumakp0MAa9SdSzmAHRt\nrkY3HsB62rJKg5s3OCZX25OBz9ogwR60cbTPttqXyGeegmlwI6bOueu1XIH5\nl4Y5nxQo14kwmVn6tfm993HE/QHNP9oW+YbfiBJPSYZ7w0r4e3l8q4DkaYir\n2BWy\r\n=n4+O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"x-auth.js","name":"x-auth-plugin","author":{"name":"Jack Thomson"},"readme":"# X-Auth\n\nX-Auth is a plugin built for the Dynamic Route Generator that gives you a fully fledged login system for your web applications. This is a plug and play plugin with a few lines of configuration setup.\n\n#### Features\n- Login\n- Register\n- Two Factor Login\n- Forgot Password\n- Change Password\n- Email verifications\n- SMS Integration for two factor authentication (Optional, will need to pay; current client configured is Text Magic)\n\nThis plugin is in beta and **SHOULD NOT** be used in a production environment as of yet. There is a lot of work and testing that needs to be carried out to prove this system is secure\n\n#### Example Setup\n\n```\nconst app = require('express')()\nconst mongoose = require('mongoose')\n\nconst RouteGenerator = require('dynamic-route-generator')\n\nconst { XAuth, CheckAuthentication } = require('x-auth')\n\nconst GameModel = require('./game.model')\n\nmongoose.connect('mongodb://localhost/test')\n\nXAuth.setupProps({\n  appName: 'XAuth Test',\n  authSecretKey: '12345',\n  authSecretKeyForgottenPassword: '12345',\n  cookieName: 'xauth-test',\n  cookieNameForgottenPassword: 'xauth-forgotten-password-test',\n  domainEmail: 'hello@email.com',\n  jwtTokenExpiration: 300000, // 5 minutes (Applied to cookie expiration also)\n  saltWorkFactor: 10,\n  databaseUri: 'mongodb://localhost/test',\n  themeColour: '#4096EE',\n  emailVerification: true\n})\n\nnew RouteGenerator({\n  routes: [{\n    uri: '/list/games',\n    model: GameModel,\n    handlers: [CheckAuthentication],\n    methods: [{\n      name: 'get'\n    }]\n  }],\n  app,\n  plugins: {\n    pre: [XAuth]\n    post: []\n  }\n})\n\napp.listen(process.env.PORT || 8080)\n```\n","gitHead":"27824bd9abca1ee0a9f909e6f9811fe96fee2c0b","license":"ISC","scripts":{"publish-npm:beta":"npm publish --tag=next"},"_npmUser":{"name":"jackthomsonn","email":"hello@jackthomson.co.uk"},"homepage":"https://github.com/Jackthomsonn/X-Auth#readme","keywords":["dynamic","route","generator","authentication","plug","and","play","X Auth"],"repository":{"url":"git+https://github.com/Jackthomsonn/X-Auth.git","type":"git"},"_npmVersion":"6.0.1","description":"X-Auth is a plugin built for the Dynamic Route Generator that gives you a fully fledged login system for your web applications","directories":{},"maintainers":[{"name":"jackthomsonn","email":"hello@jackthomson.co.uk"}],"_nodeVersion":"8.11.2","dependencies":{"ms":"2.1.1","moment":"^2.22.1","express":"4.16.2","request":"^2.85.0","bcryptjs":"2.4.3","mongoose":"5.0.8","sendmail":"1.4.1","jsonwebtoken":"8.2.0","awesome-phonenumber":"^2.2.5","textmagic-rest-client":"^1.0.10","dynamic-route-generator":"1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/x-auth-plugin_0.0.3-beta_1527504557118_0.8648193729306222","host":"s3://npm-registry-packages"},"_id":"x-auth-plugin@0.0.3-beta","version":"0.0.3-beta"}