Using existing web application as a atlassian connect add on

I am new to atlassian connect add on development. I came to know that we can either develop a fresh add on or we can use our existing web application as an atlassian add on. I want to know in which situation should we use our existing web application as an atlassian connect add on.

You can use your existing add-on - connect doesn’t require things to be seperated.

You’d just have to provide the atlassian-connect.json and depending on what you’re doing you may need to add the all.js reference to any url that you’re embedding into a web-panel/page. The only other thing is that you’ll more than likely need to add in jwt support for things.

Thanks, that helped. The other thing which i am curious about is that can i use single sign on machenism for my web application (the jira add-on) and my jira account. for instance if i am logged into my application ( the jira add-on) and i would embedd a link in my application which would invoke a rest call to jira cloud instance and redirect me to my jira account without requiring me to enter my jira credentials.

You could do it but all Atlassian Connect ui is done through iframes (or at least when you’re in the JIRA frameworks) so if you rely on cookies you may have some weird user experiences since your cookies would be considered third party cookies.

In your case though you’d need to modify your code to make use of the AP.request ( ) since it will know about the user etc.

In short: embedding your app - you should be good
Your app calling back to JIRA: You’ll need to use the AC js items.

i am developing my add on in java. so do we have any alternative to AC js items in java ? or can i call Ap.request from my applications ui itself. I am using angular js in my ui.