go-jira / jira

simple jira command line client in Go
Apache License 2.0
2.68k stars 328 forks source link

Support Authorization: Bearer, for personal access tokens on Jira Server/Jira Data Center #432

Closed fhoy closed 2 years ago

fhoy commented 3 years ago

Supporting personal access tokens (PATs) with REST APIs is apparently a fairly new feature for Jira Server and Jira Data Center (see issue closed November 2020), and this requires passing the token as a header Authorization: Bearer <token>. As far as I can tell from the relevant go-jira code, setting authentication-method to api-token will always use Basic authentication, though.

I have made a local workaround, which I would be happy to clean up and submit as a PR. However, I would like some input on the desired configuration mechanism. For my quick hack, I just added an extra value for authentication-method, but this may not be the best solution.

fhoy commented 2 years ago

I snoozed, and lost. This has since been fixed by https://github.com/go-jira/jira/pull/447, so I'm closing this issue.