Hi,
I've written a Jira Java plugin which implements a listener for issue update events.
Once an event occurs, I need to make a REST call to the Jira server, using the current authentication (the user that initiated the issue update).
I know how to make the call to the connected Confluence server, using code similar to this:
String url = "/rest/myrest/1.0/test";
ApplicationLink appLink = applicationLinkService.getPrimaryApplicationLink(ConfluenceApplicationType.class);
ApplicationLinkRequestFactory applicationLinkRequestFactory = appLink.createAuthenticatedRequestFactory();
ApplicationLinkRequest request = applicationLinkRequestFactory.createRequest(MethodType.GET, url);
String response = request.execute();
This works fine and performs the proper authentication.
Is there a service similar to the ApplicationLinkService which can make the authenticated REST call to my own Jira server?
I know I can make a a simple REST call using any Java REST client, but since I don't know the username & password, I can not perform the authentication.
Any ideas?
Thank You,
Shay