Skip to content

IAV-848/Refactor credential injection (regex → Jackson DOM), add Shopify OAuth, extract workflow helpers

salaheddine zidani a demandé de fusionner feature/IAV-848 vers develop

Summary

Replaces the fragile regex-based credential injection with Jackson DOM parsing, adds Shopify OAuth 2.0 store authorization, and cleans up workflow-related helpers.

What changed

Credential injection refactor — The old approach used 3 regex patterns (regular, escaped, double-escaped JSON) to replace credential IDs in n8n templates. WorkflowCredentialInjector now parses the JSON into a tree, walks each node's credentials block, and sets values directly. Handles embedded JSON via recursive descent. N8nCredentialTypeMapping centralizes type name mappings that were previously duplicated.

Shopify OAuth — Two new endpoints for store authorization. State managed via Caffeine cache (10min TTL). Server holds client credentials. Token stored via N8nService.createCredential().

Workflow creationWorkflowCreationHelper handles template selection (Shopify vs WooCommerce), webhook path modification, and cleanup. Webhook URLs are config-driven. Prerequisites validated before creation. DB saves reduced from 3 to 1.

Bug fixmapToN8nFormat() was hardcoded to WOOCOMMERCE for all credential types.

Testing notes

  • Verify credential injection for all 7 integration types
  • Test Shopify OAuth end-to-end with a dev store
  • Test workflow creation with both Shopify and WooCommerce templates
  • Confirm prerequisite validation rejects incomplete configs
  • Interrupt workflow creation → verify cleanup deletes the n8n workflow

Closes IAV-848

Rapports de requête de fusion