andygrunwald / go-jira

Go client library for Atlassian Jira
https://pkg.go.dev/github.com/andygrunwald/go-jira?tab=doc
MIT License
1.44k stars 458 forks source link

Use Personal Access Tokens instead of username and password #641

Closed fabriziopandini closed 11 months ago

fabriziopandini commented 11 months ago

What would you like to be added?

I would like to use Personal Access Tokens instead of username and password to access Jira

Why is this needed?

According to Jira documentation

Personal access tokens are a safe alternative to using username and password for authentication with various services.

https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html

Anything else we need to know?

If you give me some pointers, I can try to contribute this feature

And thanks for developing and maintaining this project!

vladimir-ch commented 11 months ago

This already exists, see onpremise/examples/bearerauth/main.go on the main branch.

fabriziopandini commented 11 months ago

Worked like a charm! Awesome project!