{"_id":"@amps1819/auth","_rev":"5-7b7e406597eb6af2275da2c97d00a3b9","time":{"0.1.0":"2019-04-22T19:08:35.965Z","created":"2019-04-24T10:10:35.611Z","0.2.0":"2019-04-24T10:10:35.983Z","modified":"2022-04-04T13:52:56.580Z","0.2.1":"2019-04-25T01:12:27.422Z"},"name":"@amps1819/auth","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.0":{"name":"@amps1819/auth","version":"0.2.0","description":"Authentication middleware for DSI #08 assignment","main":"auth.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+ssh://git@github.com/ULL-ESIT-DSI-1819/auth-amps1819.git"},"author":{"name":"amps1819"},"license":"ISC","bugs":{"url":"https://github.com/ULL-ESIT-DSI-1819/auth-amps1819/issues"},"homepage":"https://github.com/ULL-ESIT-DSI-1819/auth-amps1819#readme","dependencies":{"bcrypt-nodejs":"0.0.3","express":"^4.16.4"},"_id":"@amps1819/auth@0.2.0","_nodeVersion":"11.12.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-cpVB2HVTaqZtlECW0UeNilbgc6V2eCqUbi5xPev+nz0rU2mu8p7S1CieQyk262daVhqmLxxsav9TAC3X7lqj8g==","shasum":"997b5eaf10f9646ed695a953083291df9e96107b","tarball":"https://registry.npmjs.org/@amps1819/auth/-/auth-0.2.0.tgz","fileCount":3,"unpackedSize":7040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwDYcCRA9TVsSAnZWagAAIYEP/3G3dYr1MNj1skMoReKF\nwzBYj6AawExPi/Ppr05/5NxA3CAEcrYH7Dc8TGgnrbQA+RYZFiyrjcFoE5N3\nqxJy6MwljerCkTih/ZRMx341EAWihkBPrazp+OI9mSjF54gGRp3CreTTf2b1\n5ckHJdVHosyZLjRNJrWzZZMREnhKaqQtjcouGzYqRZuFb9AcO/npg7gr/iTU\nNCDoBAu/IAB1R3RnaTQhokzcljpzCJasyDQwNK8n1t5P96SninfrXqAFXnQ+\nG1Hncvr0mbW/btiiTMiqHwkSeCsYPLB7odSbVPHzUIyrmWiBWmzFzVkLxjp6\nB7SM0ZOdx+FdIJL/CyOwqXwiK+p07Gb033/OBEPb5e1CwsNW1iaiCfNgVxxL\negcX4PP4VtxmYDJHB/JOYaMGyj1qKABGQifSiIWA92Hl1Lguy7LbgwzVbk3m\n0SGhJszAwqTrYmlYttSdkG8PDZK+s9apNsIHdP6bO20RTXerwzbZpWzw9iY8\n5EFcMsxz6Q464bJoJVYarIIbgqVX3dpEPmDE1Ym4vGVvmkGgLUKoV5us+PPN\nWMTtyPLvn7Adje9tDui1uIhCVH1YK8lxAXSSB2SG+f9kgFdOkhAnZSDVlPlx\nG8WUSfDcZnt50PwjTVQw0yCTumoW5xS25LZ0VDjgk2sakdHthkNzmoUpy1N+\nBt8c\r\n=FpUs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGS+hV/li+idGBpvk5HNuVt23aw0gYLD5aMMM5wWRMDqAiEA8X7sGrVGj76vF6dMmktJJPHr6W7A3f9K9rBtvIwoDPo="}]},"maintainers":[{"name":"amps","email":"amps.dsi.sytw@gmail.com"}],"_npmUser":{"name":"amps","email":"amps.dsi.sytw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/auth_0.2.0_1556100635808_0.8502436818586978"},"_hasShrinkwrap":false},"0.2.1":{"name":"@amps1819/auth","version":"0.2.1","description":"Authentication middleware for DSI #08 assignment","main":"auth.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+ssh://git@github.com/ULL-ESIT-DSI-1819/auth-amps1819.git"},"author":{"name":"amps1819"},"license":"ISC","bugs":{"url":"https://github.com/ULL-ESIT-DSI-1819/auth-amps1819/issues"},"homepage":"https://github.com/ULL-ESIT-DSI-1819/auth-amps1819#readme","dependencies":{"bcrypt-nodejs":"0.0.3","express":"^4.16.4"},"_id":"@amps1819/auth@0.2.1","_nodeVersion":"11.12.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-x/9Ky+1Df3uafC/Pl3zzNV1GxPS676I990aOZsm653c1EEcvlqLI7YrHBfNyAhrkUzqP7BVLSM5bk3BvSjpUbw==","shasum":"3b000c8f7f957a171a9399b073b245005535154d","tarball":"https://registry.npmjs.org/@amps1819/auth/-/auth-0.2.1.tgz","fileCount":3,"unpackedSize":7026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwQl8CRA9TVsSAnZWagAACOgQAKKvgO8w4D3TVxkcwO3Y\ne2z+WeVNjwn3hduCvwbMgxJoZrj94VEd/Cr7qBS8m/DSUAqZoBoTc7NyXggU\nq0yNkP7GzDvzQ/SfHFIGv2WY9De+rm6f/xLqNucdIjcbgjMsYdrqjqtn4/Rx\napoUo9KcYKp+UhnCG29to2KtP0m2GiuErL2qhh9uflOgtRednHKN4XrbTazm\nJJ+bU2JIwtsONR8OH573XXbi86FC3Y74wHa+Vid55Wd9GD7brEwG9FmVrB9S\ns6Fv7R4LKk1xjhoS3k2hMprBkE3fNbDUr5NFwEFsLiymHgvSWx2NOFtUviro\nAypurB/Xxpnw0TCRo/cSLIKgbxh/ITFUjCmVrpzHW50kuczqQ/dC3y4OSfAf\n9LO7PeMnWEeJe5WVD6JmTvIu09Y57M6XjcqN2OxKJ2wabTMcjzk8eJ4BDN/5\nJlAJaIPtkuixKdixnTEA/DriR9QN18EQrxzkpsrNZzN1uDexP+RGVIgjhcpT\nwcdGsDn44hs+8fRabb8B8X5REDa9q9P9VbJKZobH9J+DYVzKdgXVQMSAoYxa\n8W5/Y3im+QdWeEghOlewLvfum8VpEos/d2957h5xPu2Vbf5Uz7uW20FBU3In\nhrl7+5HUMHcTOXaNJivl95mfubO07ep9F0RaadJGAJIpYPf9C846XGx0V1wi\njkWM\r\n=5svt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEBi/7qxTs9s7oUzK+NTdmJFBpWpTRfBB5bb3wx8pND8AiBar02TkKpjOYO7IaivPpah4vNS5urB7H98MkgMuOZmEA=="}]},"maintainers":[{"name":"amps","email":"amps.dsi.sytw@gmail.com"}],"_npmUser":{"name":"amps","email":"amps.dsi.sytw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/auth_0.2.1_1556154747332_0.22716457346135166"},"_hasShrinkwrap":false}},"maintainers":[{"name":"amps","email":"amps.dsi.sytw@gmail.com"}],"description":"Authentication middleware for DSI #08 assignment","homepage":"https://github.com/ULL-ESIT-DSI-1819/auth-amps1819#readme","repository":{"type":"git","url":"git+ssh://git@github.com/ULL-ESIT-DSI-1819/auth-amps1819.git"},"author":{"name":"amps1819"},"bugs":{"url":"https://github.com/ULL-ESIT-DSI-1819/auth-amps1819/issues"},"license":"ISC","readme":"# [@amps1819/Auth](https://www.npmjs.com/package/@amps1819/auth)\n\nAlmost copypaste of @ull-esit-pl/auth for DSI #08 assignment.\n* Code modified to avoid duplicate route naming and thus typing errors through router.route() method.\n1. [merge(#71 & #80)]\n2. [merge(#103 & #112)]\n\n## About this module\n\nThis module exports a function that returns an express middleware. \n\nIt defines the routes \n1. `/login` and `/register` via GET and POST methods, \n2. `/logout` via the GET method only\n3. `/content` via the GET method.\n    * This is the route that will be protected and users must be logged in before accessing this route\n    * Otherwise a `401` message will be sent with an `unauthorized view`.\n\n## Student\n\n* Original version: Carlos Domínguez García (alu0100966589@ull.edu.es)\n* Modified by the lecturer (crguezl@ull.edu.es)\n* Modified by the student amps1819 (amps.dsi.sytw@gmail.com)\n\n## API\n\nThe function that exports the module needs an object. The properties of that object are the following:\n\n* `passwordFile`: location of the file to store the users credentials.\n\n* `pathToProtect`: the files that will be accessible only when users are logged in.\n\n* `registerView`: view containing the form to register. It will be served at '/register' via the HTTP GET method.\n  - The names of the fields must be `username` and `password`\n\n* `successRegisterView`: view with the message to render when the user registers successfully.\n\n* `errorRegisterView`: view to render when there is an error in the registration.\n\n* `loginView`: view containing the form to log in. It will be served at '/login' via the HTTP GET method.\n  - The names of the fields must be `username` and `password`\n\n* `successLoginView`: view with the message to render when the user logs in successfully.\n\n* `errorLoginView`: view to render when there is an error in the login.\n\n* `logoutView`: view to render when they log out.\n\n* `unauthorizedView`: view to render when a user tries to access '/content' without being logged in\n","readmeFilename":"README.md"}