Hi,
We are developing an addon using AC-SpringBoot and I have some questions regarding license check.
1- We want to check if the addon’s license is valid for every request made to our server from our addon’s pages. We can get the license status by sending a request to GET /rest/atlassian-connect/1/addons/{addonKey} on the server-side, but this process takes 200-300 ms - which is too much for us. Is there a faster method? (“lic” context parameter does not work for us since it is sent only when the page is opening.)
2- If we add the “addon_is_licensed” condition to atlassian-connect.json for the corresponding page, the license check is handled by Jira when opening the page. But if the page is opened while the license is valid, the requests made after the license expires get “Uncaught Error: ACJS: Cannot get token. Add-on does not support JWT authentication” error (We use AP.context.getToken for every request made from the client). Is this error due to the license condition we added? Does Jira stop refreshing JWT’s when the license becomes invalid and the app descriptor has license condition for the corresponding page? Can we trust JWT for license check?
Thanks in advance,
Berkay