Get autorization when sending HttpPost

Hi,

I'm developing an add-on, where I have an event listener, and every time there are changes in the issue, comments, or attachment, I will need to send a request to a server in our company.

At first, I had the issue on "PKIX path building failed", and that is solved by importing certificates to the cacerts.

Now, I'm getting a new error message saying that I am not authorized to access the server. So, what I did was to use WinHttpClients.createDefault(), and it works! But this is just my local environment where I develop the add-on. If I install it to our JIRA server, it won't work because then it will be getting the server's Windows' credentials.

What I need is to get the credentials of the user from the browser. How can I do that?

1 answer

This widget could not be displayed.

Hi Dhinnesh - since this is development related, you might want to try asking this over at: https://community.developer.atlassian.com as well (if you haven't already).

There are a lot of helpful and experienced people over there, so you will probably get a quicker response.

You can read more about the Developer Community in this article: https://community.atlassian.com/t5/Feedback-Forum-articles/The-Atlassian-Developer-Community/ba-p/459061

Thanks Sam, I've posted there :)

Sam Hall Community Champion Apr 06, 2017

Here's a link to the thread your created, so others can follow too: https://community.developer.atlassian.com/t/get-autorization-when-sending-httppost/2097

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

528 views 23 15
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you