JIRA maintain login session

285 Views Asked by At

In servlet programming, I have a html login page in which I ask for username and pass for a user and when he enters the details all issues assigned to him are displayed. Furhter when he clicks on any of it he gets navigated to issue page.

Here I am facing a problem that whenever clicks on issue link it opens in new tab and ask for his credentials again. What I want to do is to maintain the same session(JSESSIONID) which he logged in on my html login page.

I am using JIRA rest api for login and fetching details.

How do i achieve it..?

1

There are 1 best solutions below

0
On

The REST API is used to connect between your server-side app and JIRA, not between the user's browser and JIRA (with the latter being where you need to establish the authentication for viewing the issue detail page).

Assuming you have a behind-the-firewall instance of JIRA Server, your options are:

  1. Convert your servlet to run as a JIRA Plugins 2 add-on and run it within JIRA itself (meaning that users would leverage the JIRA authentication framework to log in before accessing your servlet in the first place), or
  2. Write a custom Single Sign-On authenticator for JIRA that will accept whatever credentials you have set up for the user in your external servlet. This is a nontrivial solution, so depending on the complexity, it may be easier to just do #1.