{"dist":{"shasum":"78c2ebdca853e24d312ddc8162820cba93c0291a","tarball":"https://registry.npmjs.org/x-auth-plugin/-/x-auth-plugin-0.0.2-beta.tgz","fileCount":21,"integrity":"sha512-itPjNQ930Slu/S6pu2cPqBgyl+/qNbeiRHmMiCjpYvk1oXvaOqctxdoLatpag6lCsSGXdUqenDOkDYfMdfeJWQ==","signatures":[{"sig":"MEYCIQC4vAILuOiNwMR5TdrauZhDx5MOI789WUA3x05+awFhtwIhAPTEPAGOBu0OBlcqeIPoagyNRArZ3lwos2M4lwBxc4eL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbC92GCRA9TVsSAnZWagAAp1IP/2SM2M3ZEq7Ccl5Pbktz\n1P6/7eZ5XpJ716cMWKuQzHJXK9K4JtOjH6YtJJ002JnA1iZU2JcW+fuunX0E\nMZ1yFXsatBsLoniGLDcFuWE/JjOCX+mCHKyu3JfPsvhn2kfUdQLzKWWLXFNZ\nEjdkhZvsv1EyVtM6VHtxbQW6hUwjeFyis3MNVlslsVzKQ9/NB+l3D89H9OXN\niLHR7kwNHGw5I/VXeBs6LTtFwqROAPDnBnyqZ5dFQ5cF0NYrSQF+WbXGXcoI\nCQvNMYBIyKpB1PUZ1w6nNzPxMHSr9TIvd1WRE8eYVvlixjTunpZWo9kntpXW\nZyCT/9CDRWURCGZXntvxm0/ypYAL8AkSC9y22KR3EJoKVyRtwXt0QqOPt7Nm\nZXid22YYOcLDphghTgFTsX274KMHTum0emkUjv3XGl/s4Ilp3OnCGo1AfJdm\nSL+iiFvXS1GRj3nqNzl2X2wc8EpoIKMj61Q6LmayNIb3M3H7spQqQHWG8vq5\noKAGY0n4OTqIThbT+UwSD5SuqttmmDhd/rkz0dAcCeh/2kyiQflaWPGkoL0F\nozwaO+WWfNdvzPtz0oLfS+W9AraY3xFpk6lb0S28ymwGTlLG1Ftu6gFws61P\nQhWQZXLNBIicON3l2BUSjEGw0pLqwSiW5KNUMNbz7Yfc2apSCRIqVfupIMxz\nRS8R\r\n=u9aB\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":"5bf9fcda0d48c2f241d27350298d15c641267064","license":"ISC","scripts":{"publish-npm:beta":"npm publish --tag=next"},"_npmUser":{"name":"jackthomsonn","email":"hello@jackthomson.co.uk"},"keywords":["dynamic","route","generator","authentication","plug","and","play","X Auth"],"_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. This is a plug and play plugin with a few lines of configuration setup.","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.2-beta_1527504262223_0.9914672458819622","host":"s3://npm-registry-packages"},"_id":"x-auth-plugin@0.0.2-beta","version":"0.0.2-beta"}