I have two controllers one is homecontroller and other is dataController, and two html pages home.html, data.html.
Url in my app descriptor is "home". In homeController I'm using HTTP GET to retrieve data from jira.It looks like this -
@RequestMapping(value = "/home", method = RequestMethod.GET, produces = "application/json")
public ModelAndView getIframe(@AuthenticationPrincipal AtlassianHostUser hostUser) throws UnirestException {
List<Filter>filternames =new ArrayList<Filter>();
HttpResponse<JsonNode> filters = Unirest.get("https://mydomain/rest/api/3/filter/search?maxResults=1000")
And I'm rendering home.html which has all filters as a dropdown and when one click on it he/she should get issues of it. for that I'm redirecting to data where dataController fetches all issues in that filter.
Problem occurred is Http request in datacontroller is successfull and I could get the issues as well but data.html is not rendered.
It is giving Rejected incoming request for controller requiring JWT authentication (GET /home) error?
I did add javascript beforsend to add authorization header.