api-secure-databank/routes/usuario.js

15 lines
524 B
JavaScript
Raw Normal View History

2023-06-18 18:46:04 +00:00
var express = require('express');
var router = express.Router();
const auth = require('../middlewares/auth');
const log = require('../middlewares/log');
var usuario = require('../controllers/UsuarioController.js');
router.post('/registrar', log.log,usuario.registrar);
router.post('/iniciarSesion', log.log,usuario.iniciarSesion);
router.post('/iniciarSesionFA', auth.AuthenticatedFA, log.log,usuario.iniciarSesionFA);
router.post('/activar2FA', auth.Authenticated, log.log,usuario.activar2FA);
module.exports = router;