bobcarroll / jira-client

A simple JIRA REST client for Java
Other
475 stars 380 forks source link

Attachment download fails to authenticate #275

Open tdelacour opened 4 years ago

tdelacour commented 4 years ago

I am having trouble using the attachment download method. As far as I can tell, it is failing to authenticate the request.

Relevant method: https://github.com/rcarz/jira-client/blob/master/src/main/java/net/rcarz/jiraclient/Attachment.java#L107-L127

When I manually add an auth header, I am able to successfully execute the download. E.g.

httpget.setHeader("Authorization", "Basic ${Base64.getEncoder().encodeToString(<USER:PASS>)}")