go-atlassian icon indicating copy to clipboard operation
go-atlassian copied to clipboard

OAuth 2.0 (3LO) apps authentication

Open chris-rock opened this issue 1 year ago • 2 comments

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 avatar Nov 28 '23 15:11 chris-rock

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

chris-rock avatar Nov 28 '23 17:11 chris-rock

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

ctreminiom avatar Dec 06 '23 05:12 ctreminiom