@epehrson
Thank you, super helpful.
Since this is probably a common usage and I am probably an archetypal user (a developer with a preference for jvm and new to Atlassian APIs), a couple of follow ups may help both myself and the community.
I am still a little confused.
My desired outcome is to generate a macro in which:
- With my local server running, I type “{” into a confluence cloud page and
- see my macro listed.
The node.js starter pack provides this function (using ngrok under the hood, I assume?)
- The code below seems to require that confluence cloud already knows the local address of my macro server and also the relevant uri.
@RequestMapping(value = "/data", method = GET, produces = "application/json")
public AtlassianHostUser getData(@AuthenticationPrincipal AtlassianHostUser hostUser) {
return hostUser;
}
-
(sidenote) Can I assume that the above code and pretty much all examples assume credentials.json is in the classpath?
-
Your response seems to suggest another approach, namely inserting my local macro server url in the iframe macro that is already provided by Confluence, and then utilizing the authentication protocol you show above to autheniticate requests coming from the iframe. This is a legitimate approach. I just want to clarify.
-
Is there a way to replicate the node.js macro “register” functionality in Spring boot. It would be a brilliant feature to have. In my case, I am generating a corporate search built on scala with an ElasticSearch base. Having result server able to use dependencies from the scala middle tier would be a great plus.
Again, I thank you for your time.
(btw, I looked at the Thymeleaf demo and didn’t even see atlassian-connect jars being loaded into the runtime classpath, so I was pretty confused.)