i want to get the cookie from the browser, when i click on the transition button on view issue page.
Actually i want to perfrom the cookie base authentication.
Once i'll get the cookie then i would be able to pass it to the rest api for cookie base authentication.
Hi Muhammad,
We have steps on how to generate the cookie from your login session over on JIRA REST API Example - Cookie-based Authentication.
But if I understand your request, you want to be able to obtain the cookie via your browser session, say when a transition occurs. This cookie is actually getting generated when you login it Jira, and not necessarily when this transition happens.
But you might be able to use something like the developer Tools in the Chrome browser to obtain the JSESSIONID in order to do this. I took a look at my browser to see what this looks like in the developer tools after an issue transition:
But you can notice here that on that line of the JSESSIONID, the expiration is set to 'Session' rather than a specific date. These cookies always have some value for when they expire, but with a session timeout set, as soon as this session is over that cookie would expire. It isn't clear to me if you could actually use that cookie for a REST API authentication as such. Instead I would still recommend following the steps in JIRA REST API Example - Cookie-based Authentication if you want to use cookie based authentication.
Regards,
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.