I got this as response on trying to authenticate using rest/auth/1/session
{"session":{"name":"cloud.session.token","value":"eyJraWQiOiJzZXNzaW9uLXN
Can i use this as JSESSIONID ?
Another case is
I am able to connect using Basic authentication after that am stuck. After login if there is a redirect , do i have to authenticate again on the new page ? So if i have multiple pages do i have to authenticate each time if i am using Basic Auth ?
Hi Leo,
The documentation needs to be updated as mentioned in:
In order to make it working you just store all the cookie information in a file and use that to authenticate. E.g.:
1) Store the cookie in a cookie jar:
curl -c cookie.txt -H "Content-Type: application/json" -d '{"username":"XXXXXXXXX", "password":"XXXXXXXXX" }' -X POST https://INSTANCE/rest/auth/1/session
OR
curl --cookie-jar cookie.txt -H "Content-Type: application/json" -d '{"username":"XXXXXXXXX", "password":"XXXXXXXXX" }' -X POST https://INSTANCE/rest/auth/1/session
2) You can then use that to authenticate the successive REST calls:
curl -b cookie.txt --header "X-Atlassian-Token: no-check" -H "Content-Type: application/json" -X GET https://INSTANCE/rest/........
OR
curl --cookie cookie.txt --header "X-Atlassian-Token: no-check" -H "Content-Type: application/json" -X GET https://INSTANCE/rest/........
Cheers,
Dario
I got JSESSIONID on using it on our jira server and works fine . This one i will try on my test jira cloud!
@Dario B one quick question - i will not be able to use basic auth if log in and consequesnt request happening on different pages . Is my understanding correct ? As there is no session in basic auth !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With basic auth you authenticate each request. So each request has its own session and this can impact your JIRA performances.
If you need to send multiple requests it is much better to use cookie authentication in order to avoid DoS-sing your JIRA instance :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.