Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Make use cookie returned by JIRA Rest API to get logged through the browser

Priska Aprilia
Contributor
July 8, 2019

We are planning to embed Jira Service Desk Server Customer Portal Web View in our mobile apps.  The mobile apps and JSD will have the same users (customers) base.

We want to bypass the JSD Customer Portal login once a user/customer is logged into the mobile app. So, once the customer click on the link to the Customer Portal from within mobile app interface, they do not need to log in.

We are thinking of the following solution:

1. When the user is logging in to mobile with the user name and password, the mobile app will call Jira REST API for authentication using the basic Authentication. The basic authentication will set the cookie JSESSIONID and atlassian.xsrf.token.

2. Use the cookie JSESSIONID when request for Customer Portal url


What I have done:

I uses postman to access the Customer Portal {domain}/servicedesk/customer/portal/1 by using the basic authorization. I successfully authorized myself. I could see from the returned HTML, it had the list of the service catalogs from that Service Desk project. I could also see there are two cookies set namely JSESSIONID and atlassian.xsrf.token

 

postman.PNG

My question is can I use the same mechanism fro browser as what I used using postman? If not, what are the other methods?

I tried to follow this tutorial for Jira Cloud https://confluence.atlassian.com/cloudkb/how-to-make-use-of-a-cookie-to-get-logged-through-the-browser-945106839.html but could not get it work as described in the article.

1 answer

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 10, 2019

Hi @Priska Aprilia ,

The KB you are pointing to is for Jira Service Desk Cloud and it is outdated (I will ask to have it removed) since cookie authentication has been deprecated for Jira Cloud and the /rest/auth/latest/session endpoint removed as announced in:

 

Now, can you kindly let us know if this is for JSD Server or Cloud?

Also, can you review the below threads and see if you find another  way to do what you are trying to achieve in there:

 

Finally, please notice that this might not be the best place to get help on development  related questions. In case further help will be needed on this topic, you might want to ask the developers community instead, or open a ticket in the developers service desk:

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer