Commit Graph

11 Commits

Author SHA1 Message Date
Алекс e0ab16f82d ajustes sobre verifactu y el banco 2026-05-24 23:57:22 +02:00
JavMB 8fb5d801cf fix CORS 2026-05-15 19:52:04 +02:00
JavMB 12b1755e86 merge: resolve conflicts with remote — keep local CORS config, merge webhook notifications
- Resolved merge conflicts in Program.cs (kept configurable CORS from local)
- Resolved merge conflicts in DocumentController.cs (kept full controller
  with list/download endpoints from local)
- Integrated remote webhook notification system:
  * INotificationService interface + WebhookNotificationService
  * InvoiceService now sends Teams/Slack webhook on status changes
  * appsettings.json: added Notifications:WebhookUrl config
  * Program.cs: registered INotificationService + Webhook HttpClient
2026-05-15 19:02:32 +02:00
JavMB fe6bd57796 feat: configure Swagger Bearer auth, fix CORS, Docker and deployment
- Program.cs: added Swagger with JWT Bearer security definition using
  OpenApi v2 API (OpenApiSecuritySchemeReference), enabled Swagger in all
  environments (not just Development), registered all new services
  (ContactService, SetupService) in DI
- CORS: configurable via Cors__AllowedOrigins env var, allows all
  when empty (dev-friendly)
- DoliMiddlewareApi.csproj: removed Microsoft.AspNetCore.OpenApi (conflicts
  with Swashbuckle v10), kept Swashbuckle.AspNetCore 10.1.0
- appsettings.json: fixed Dolibarr ApiUrl to /api/index.php (was /explorer)
- compose.yaml: fixed Dolibarr ApiUrl, added JWT_SECRET default for dev,
  added healthcheck for Dolibarr container, BFF waits for Dolibarr healthy
- .dockerignore: added to keep Docker build clean
- .env.example: template with instructions for JWT_SECRET
2026-05-15 18:58:43 +02:00
javiermengual ef42797b31 feat: add webhook notifications for invoice status changes
Implements INotificationService with Teams/Slack-compatible WebhookNotificationService.
Fires on ValidateInvoice and ChangeInvoiceStatus. Silently skipped if WebhookUrl not configured.
2026-05-14 22:59:31 +02:00
JavMB 7c5d24aaa8 quito la api key LOCAL , que puse para debuggear 2026-04-16 19:06:42 +02:00
JM 98312846fa Modifico el endpoint de descargas de pdf , convirtiendo el base64 a binario 2026-04-16 09:41:46 +02:00
javiermengual 283a9e7f5f Implementar autenticación JWT con caché de tokens de Dolibarr por sesión
- Añadir autenticación estándar JWT Bearer con ASP.NET Core
- Crear DolibarrTokenCacheService para la lógica de caché de tokens
- Refactorizar DolibarrApiClient para usar TokenCacheService con SRP limpio
- Actualizar Program.cs con registros de servicios y comentarios apropiados
- Añadir AuthController para el endpoint de login
- Actualizar InvoiceService para usar DolibarrApiClient
2026-01-03 19:55:04 +01:00
javiermengual 3591ba2015 fix: aunque la key es local , la saco a dotnet user-secrets para acostumbrarme en desarollo. 2025-12-30 13:31:51 +01:00
javiermengual 3f3fd25a02 enchanche: ajusto para que no me salgan en desarollo los logs duplicados del ExceptionHandler 2025-12-30 13:28:13 +01:00
javiermengual 05a964bbaa feat: configurar API base con Program.cs y settings 2025-12-29 16:37:45 +01:00