Interactive content with a Dynamic Macro

We want a dynamic macro that will contain a combobox with a list of customers. When the customer selection changes it will make a call back to the add-on service with an updated URL that contains the new “&customer=XX” value. The issue, naturally, is that it violates JWT in that the URL is now different. Since the combobox selection is all handled on the client side, there’s no way to generate a new JWT.

In short, we want to dynamically change the URL and generate a new JWT prior to making a call back to the add-on service.

Is this possible at all?

@smaloney, did you build your add-on using one of our supported frameworks?

Yes. We are using ACE. Here’s what works:

  1. Add-on installation
  2. The initial load of a page with our macro on it. During that initial load the add-on service is able to make REST calls back to confluence using JWT.

The issue comes when the user makes a selection from the customer list. At that point the iframe needs to reload based on a new query string. Since all this is happening in the users browser, we have no way of issuing a new JWT. Hope this helps. Thank you