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 #708

Merged

Conversation

imjaroiswebdev
Copy link
Contributor

@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 the following way of setting up the http client for making API calls:

  • Use of a PagerDuty App credentials to ask for a new token on the fly.

To specify which type of token will be utilized to issue the API calls, You have to set the attribute api_token_type in the Provider configuration (Defaults to apiToken) as follow:

provider "pagerduty" {
  # Configure use of App Oauth scoped token
  use_app_oauth_scoped_token {
    pd_client_id     = var.pd_client_id
    pd_client_secret = var.pd_client_secret
    pd_subdomain     = var.pd_subdomain
  }
}

Breaking Change

  • Makes Provider token optional. Previously it was required.

Depends on: heimweh/go-pagerduty#136

@imjaroiswebdev imjaroiswebdev force-pushed the app-oauth-scoped-token-support branch 2 times, most recently from f5d6805 to f111dd1 Compare September 8, 2023 21:05
@imjaroiswebdev imjaroiswebdev marked this pull request as ready for review September 8, 2023 21:13
@imjaroiswebdev imjaroiswebdev merged commit ca0755b into PagerDuty:master Sep 8, 2023
1 check passed
@imjaroiswebdev imjaroiswebdev deleted the app-oauth-scoped-token-support branch September 8, 2023 21:16
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