{"_id":"@alu0100792218/auth","_rev":"4-334cee4f5b08fb0dfd971428861321df","name":"@alu0100792218/auth","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@alu0100792218/auth","version":"1.0.0","description":"A package for register and authorize users","main":"auth.js","scripts":{"start":"node auth.js"},"repository":{"type":"git","url":"git+https://github.com/ULL-ESIT-PL-1718/auth-analizador-alu0100792218.git"},"keywords":["auth","users"],"author":{"name":"Abel Delgado","email":"alu0100792218@ull.edu.es"},"license":"MIT","dependencies":{"bcrypt-nodejs":"*","ejs":"*","express":"*"},"bugs":{"url":"https://github.com/ULL-ESIT-PL-1718/auth-analizador-alu0100792218/issues"},"homepage":"https://github.com/ULL-ESIT-PL-1718/auth-analizador-alu0100792218#readme","gitHead":"ad79caaf9c80bc7fa47cb64e568e45d4d6f853f1","_id":"@alu0100792218/auth@1.0.0","_npmVersion":"5.7.1","_nodeVersion":"9.5.0","_npmUser":{"name":"alu0100792218","email":"alu0100792218@ull.edu.es"},"dist":{"integrity":"sha512-+8DfQ2JVy1J2/mMz46a8Jj+GykpF03ADt9MTK7ExFM5yGIcBvD2fvJ/eeR7chQGFRLMe1uuVo4E2hnz8RkcdWw==","shasum":"76405219335a5ed6c2ee30593df12d40d80ec459","tarball":"https://registry.npmjs.org/@alu0100792218/auth/-/auth-1.0.0.tgz","fileCount":11,"unpackedSize":7505,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICe1YLhzP6WzokrTEu7PSeSMww27qwRTeWupfLq8egmVAiAmR9oXsPPylJHlLoDNIxfz6p7VbbQGwvSPiVnyxwIOsQ=="}]},"maintainers":[{"name":"alu0100792218","email":"alu0100792218@ull.edu.es"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/auth_1.0.0_1521154070192_0.418750798525233"},"_hasShrinkwrap":false},"1.0.1":{"name":"@alu0100792218/auth","version":"1.0.1","description":"A package for register and authorize users","main":"auth.js","scripts":{"start":"node auth.js"},"repository":{"type":"git","url":"git+https://github.com/ULL-ESIT-PL-1718/auth-analizador-alu0100792218.git"},"keywords":["auth","users"],"author":{"name":"Abel Delgado","email":"alu0100792218@ull.edu.es"},"license":"MIT","dependencies":{"bcrypt-nodejs":"*","ejs":"*","express":"*"},"bugs":{"url":"https://github.com/ULL-ESIT-PL-1718/auth-analizador-alu0100792218/issues"},"homepage":"https://github.com/ULL-ESIT-PL-1718/auth-analizador-alu0100792218#readme","gitHead":"1e9094df11646a695c3003c8ae0aeaf4d5c3f0cf","_id":"@alu0100792218/auth@1.0.1","_npmVersion":"5.7.1","_nodeVersion":"9.5.0","_npmUser":{"name":"alu0100792218","email":"alu0100792218@ull.edu.es"},"dist":{"integrity":"sha512-Q1XRAUraJhw9MJBoQsEzGJ+7T6QApeL62tIJ+IF5aCiNFyprxyE/Q5qrAmypMbWTVJvkBk295iFNXjdY5lwKXA==","shasum":"ca96a16dc38c777636574446f388bd2aeb3bd3e2","tarball":"https://registry.npmjs.org/@alu0100792218/auth/-/auth-1.0.1.tgz","fileCount":11,"unpackedSize":7620,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFAcWnAbfdDCzw53Qg6PyvSd/wJ1HAoghh2EWFIxEVsQAiEAjDayMysgxwhzKAOsDnx279czsApYlei0LLiSqJW0Lqc="}]},"maintainers":[{"name":"alu0100792218","email":"alu0100792218@ull.edu.es"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/auth_1.0.1_1521154269173_0.6553590386182613"},"_hasShrinkwrap":false},"1.0.2":{"name":"@alu0100792218/auth","version":"1.0.2","description":"A package for register and authorize users","main":"auth.js","scripts":{"start":"node auth.js"},"repository":{"type":"git","url":"git+https://github.com/ULL-ESIT-PL-1718/auth-analizador-alu0100792218.git"},"keywords":["auth","users"],"author":{"name":"Abel Delgado","email":"alu0100792218@ull.edu.es"},"license":"MIT","dependencies":{"bcrypt-nodejs":"*","ejs":"*","express":"*"},"bugs":{"url":"https://github.com/ULL-ESIT-PL-1718/auth-analizador-alu0100792218/issues"},"homepage":"https://github.com/ULL-ESIT-PL-1718/auth-analizador-alu0100792218#readme","gitHead":"8a319fea22a38436d93f0aa9f8ddae57b575b271","_id":"@alu0100792218/auth@1.0.2","_npmVersion":"5.7.1","_nodeVersion":"9.5.0","_npmUser":{"name":"alu0100792218","email":"alu0100792218@ull.edu.es"},"dist":{"integrity":"sha512-mrHYb109ttobFOewrXmC+QHFEt1HOCExjWWQrWRhwioW9rwPbxch/2R3b2lABHyqVfL+27X5hRJsjYekKx5ZaA==","shasum":"c46cd8e306c931e46e571267603e9b6e14556705","tarball":"https://registry.npmjs.org/@alu0100792218/auth/-/auth-1.0.2.tgz","fileCount":11,"unpackedSize":9176,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGdcuVii1digh5lgM6l6gITik8kC1+lgpVK0XXxmog73AiEArWVrS8tz962QYKwqxTCDKkjgMTYhoXLjlkalELMNnf0="}]},"maintainers":[{"name":"alu0100792218","email":"alu0100792218@ull.edu.es"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/auth_1.0.2_1521155961522_0.513183861078228"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-15T22:47:50.143Z","1.0.0":"2018-03-15T22:47:50.264Z","modified":"2022-04-04T13:40:48.906Z","1.0.1":"2018-03-15T22:51:09.215Z","1.0.2":"2018-03-15T23:19:21.582Z"},"maintainers":[{"name":"alu0100792218","email":"alu0100792218@ull.edu.es"}],"description":"A package for register and authorize users","homepage":"https://github.com/ULL-ESIT-PL-1718/auth-analizador-alu0100792218#readme","keywords":["auth","users"],"repository":{"type":"git","url":"git+https://github.com/ULL-ESIT-PL-1718/auth-analizador-alu0100792218.git"},"author":{"name":"Abel Delgado","email":"alu0100792218@ull.edu.es"},"bugs":{"url":"https://github.com/ULL-ESIT-PL-1718/auth-analizador-alu0100792218/issues"},"license":"MIT","readme":"## Description\nJavaScript module for protect data with a simple middleware that control the authentication.\n\n[![npm version](https://badge.fury.io/js/%40alu0100792218%2Fauth.svg)](https://badge.fury.io/js/%40alu0100792218%2Fauth)\n\n### Instalation and use\n\nTo install:\n\n```\nnpm install @alu0100792218/auth\n```\n\nTo use it:\n\nInstall express dependencies and create a server. You can see a working example below:\n\n```\nconst ip = require(\"ip\");\nconst express = require('express');\nconst app = express();\nconst session = require('express-session');\nconst cookieParser = require('cookie-parser');\nconst bodyParser = require('body-parser');\nconst auth = require('@alu0100792218/auth');\n\napp.set('views', __dirname + '/node_modules/@alu0100792218/auth/views/'); //Configuramos el directorio de vistas\napp.set('view engine', 'ejs');\n\n\napp.use(cookieParser());\napp.use(bodyParser.urlencoded({extended : false})); //Para recuperar parámetros de peticiones post\n\napp.use(session({\n    secret: '2C44-4D44-WppQ38S',\n    resave: true,\n    saveUninitialized: true\n}));\n\napp.use('/', auth({ passwordFile: './users.json',\n                    pathToProtect: './src',\n                    loginView: 'formulariologin',\n                    fullLoginView: 'logincompleto',\n                    logoutView: 'logout',\n                    errorLoginView: 'errorlogin',\n                    registerFormView: 'formularioregistro',\n                    errorRegisterView: 'errorregister',\n                    registeredView: 'registrado',\n}));\n\napp.use('/scripts', express.static(__dirname + '/node_modules/xregexp/'));\napp.use('/script', express.static(__dirname + '/node_modules/@ull-esit-pl/uninums'));\n\napp.get('/', function(req,res){\n  res.render('index');\n});\n\n// listen on all addresses\nconst server = app.listen(8080, '0.0.0.0', function () {\n  \n  const port = server.address().port;\n  console.log('Servidor escuchando en el puerto: ' + port);\n\n});\n\n```\n\n### Repository: [Auth](https://github.com/ULL-ESIT-PL-1718/auth-analizador-alu0100792218)\n","readmeFilename":"README.md"}