Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for PagerDuty Apps Oauth scoped token #136

Merged

Conversation

imjaroiswebdev
Copy link
Collaborator

@imjaroiswebdev imjaroiswebdev commented Jun 30, 2023

This update brings support for using Scoped Oauth Token as mechanism to authenticate API calls to PagerDuty public APIs.

It will add two ways of setting up the http client for making the calls:

  • Direct use of a valid App Oauth scoped access token.
  • Use of the PagerDuty App's credentials to ask for a new token on the fly.

In order to communicate the library We want to use one type of token or the other, We should configure the Property APITokenType in client config. Which could be any of apiToken, scopedOauthToken or useAppCredentials.

Additionally introduces github.com/heimweh/go-pagerduty/persistentconfig library for handling persistence of App Oauth scoped token, which can be leveraged for other Apps that make use of PagerDuty Scoped Token for authenticating API calls.

@imjaroiswebdev imjaroiswebdev force-pushed the app-oauth-scoped-token-support branch from 0662454 to f9273cc Compare September 7, 2023 16:45
@imjaroiswebdev imjaroiswebdev merged commit a96e6c0 into heimweh:master Sep 8, 2023
@imjaroiswebdev imjaroiswebdev deleted the app-oauth-scoped-token-support branch September 8, 2023 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant