I am trying to get a session cookie from:
POST
https://xxx.atlassian.net/rest/auth/1/session
{"username":"aaaa","password":"bbbb"}
I am pretty sure that the provided credentials are correct - I can login with them in the web interface. However the call made with Postman always returns:
{ "errorMessages": [ "Login failed" ], "errors": {}}
There is no response header that would give any more information why it fails.
What could be the reason? I was thinking that maybe it is catpcha, but I cannot check that, as I always get redirected to https://id.atlassian.com when I try to access the Jira login page directly.
@M KCookie based authentication has been deprecated and removed for Jira cloud in favor of token based basic authentication.
You can learn more from this notification which is more then 6 months old - https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-basic-auth-and-cookie-based-auth/
Thank you for the information. I understand that token based authentication only applies to Jira cloud. Is there a way to implement authentication in javascript that would work for both Jira cloud and Jira server?
Cookie based authentication did work well for both server types.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@M KI made a small script in NodeJS for copying attachment from Server to Cloud (and vice versa), and I used BasicAuth for both. The only difference is in server/dc environment you have to use 'username' and 'password' combo whereas in cloud you have to use 'email' and 'api token' combo, when I made a UI for this, in form I mentioned this for users.
So I think BasicAuth is good enough for these kind of use cases.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you. In the older server versions I am using a call to /session to get a session cookie. I guess I will have to change that to basic auth.
When calling jira server with username / password, do you encode the string to base64 like when calling jira Cloud?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, BASE64 encoding is required for server version also.
You can refer this - https://developer.atlassian.com/server/jira/platform/basic-authentication/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would like to ask you for a small favour. Since I do not have access to a Jira Server, would you be so kind to test if my script works with Jira Server too? It can be installed in Chrome / Opera / Firefox from: https://www.novibyte.com/
I think you might like it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DPK,
If you try the iPlugin script, you can best use Chrome; the webstore now publishes the latest version 5.0. It can be installed here: https://www.novibyte.com/
I could test it on Jira Cloud. It would be great to hear if it also works on Jira Server.
Best,
MPK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@M KTwo issues so far,
1. Window is too much transparent, and if you site is blue it become difficult to read text in plugin dialog.
2. When I entered site details, and pressed `LOGIN` button, nothing happen. Neither there was indicator of processing nor any action happen even after 2-3 minutes. I have triple checked credentials I was using. Also there was not network request, so it seems like some JS issue.
I hope this help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is strange indeed. The calls to Jira are made by the background page. You can open it by extensions > iPlugin > background page. It should show why the call fails.
Also, if you could provide me with a test account on some Jira server accessible from outside, I could test it myself. If that is not possible, I understand.
PS If you try the same with Jira Cloud it should work fine with emai / API Token login.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Marek,
You can this site one company has hosted for demo of Requirement Management tool called RMsis, there product (make sure you don't use at large scale).
Credentials are,
Site - https://jira-rmsis.optimizory.com
Username - pm1
Password - project123
Hopefully this resolves your issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This helped me so much, many thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.