REST API, Receiving a 401 Authentication failed message, but worked before and still works with separate cUrl

Hello

That was the tutorial I was following yes. The code provided with that tutorial doesnt appear to work as provided. I did also attempt to edit that Properties Client file to no avail. Perhaps its something that someone on the Atlassian team can examine as I believe that I was not the only one facing that issue.

Giving up on getting this implementation of OAuth to work, we went back to examining why we could send a REST API request to our bitbucket installations, but not to JIRA’s.

We are using Apache httpcomponents for our java code. In both Bitbucket and JIRA, we are using an interceptor with the DefaultCredentialsProvider to perform preemptive authentication. Worked just fine in both Bitbucket and JIRA until it wouldnt work in JIRA anymore.

Examining our own debug server logs, we noticed that without prompting, JIRA was dropping the header information and replacing it with an anonymous authentication instead while Bitbucket would retain the header information intact and authenticate properly.

The header information was also retained by JIRA for CURL calls from the shell. We couldnt determine why JIRA was doing this all of a sudden.

Our solution was to forcibly recreate the headers on the REST API call upon sending and for some reason, JIRA decided to retain them this time.

Thank you for following up.