Validate JWT token and check session status
authMiddleware.authMiddleware) is applied to all protected routes and performs the following validations:
Authorization headerBearer <token>admin, calidad, supervisor, or operadorrequireRole middleware checks if the authenticated user has the necessary permissions.
sesiones table with the following information:usuario_id: User IDtoken: JWT tokenip: Client IP addressexpires_at: Expiration timestamp (12 hours from login)