ctreminiom / go-atlassian

✨ Golang Client Library for Atlassian Cloud.
https://docs.go-atlassian.io
MIT License
123 stars 34 forks source link

OAuth 2.0 (3LO) apps authentication #251

Open chris-rock opened 10 months ago

chris-rock commented 10 months ago

Is your feature request related to a problem? Please describe.

Thank you for the great sdk for atlassian! Is there a way to use OAuth 2.0 (3LO) apps with the jira sdk?

Describe the solution you'd like

Ability to support Oauth 2.0 besides api token authentication.

Describe alternatives you've considered

-

Additional context

-

chris-rock commented 10 months ago

Do I see this right that the bearer token can be used for that? https://github.com/ctreminiom/go-atlassian/blob/9e23f15c805f46586ec851616551a5fd8e02ac6d/service/common/authentication.go#L15

ctreminiom commented 9 months ago

Hi @chris-rock, thank you for the interest on this project!

You're right, you can use the SetBearerToken to authorize the HTTP request, but the URL building and the exchange authorization has not been implemented.

I'll try to create a POC using the docs: OAuth 2.0 (3LO) apps