It looks like AP.context.getToken doesn’t work from workflow extension configuration pages (e.g. workflow validator configuration pages). When you can AP.context.getToken from such a page, it logs an error in the browser console:
ACJS: content resolver failed to get context jwt token
and on the Network tab, it shows that the HTTP call that it makes to the Jira instance fails with a 404 error for this request:
This is a blocker for us, as this means we cannot get a fresh JWT token from our configuration pages, which forces us to use the initial JWT token and significantly increase the token TTL, which is a major security issue.
We haven’t checked all module types yet, but I think Atlassian should test them all - and fix them all!
@dmorrow can you please look into this?