const express = require('express');
const SecurityController = require('../controllers/securityController');
const { authenticateToken } = require('../middleware/auth');
const router = express.Router();
// All security routes require authentication
router.use(authenticateToken);
/**
 * @route   GET /api/security/failed-logins
 * @desc    Get failed login attempts within specified hours
 * @query   hours - Number of hours to look back (default: 24, max: 720)
 * @access  Private (All authenticated users can see their own, Admins can see all in org)
 */
router.get('/failed-logins', SecurityController.getFailedLogins);
/**
 * @route   GET /api/security/password-changes
 * @desc    Get password changes within specified days
 * @query   days - Number of days to look back (default: 7, max: 365)
 * @access  Private (All authenticated users can see their own, Admins can see all in org)
 */
router.get('/password-changes', SecurityController.getPasswordChanges);
/**
 * @route   GET /api/security/overview
 * @desc    Get security overview (failed logins + password changes)
 * @access  Private (All authenticated users)
 */
router.get('/overview', SecurityController.getSecurityOverview);
module.exports = router;
//# sourceMappingURL=security.js.map