Skip to content

Commit

Permalink
not that context
Browse files Browse the repository at this point in the history
  • Loading branch information
1riatsila1 committed Oct 2, 2024
1 parent 9f53e7f commit e2864ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/config-api-provider/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (p *uxiConfigurationProvider) Configure(ctx context.Context, req provider.C
uxiConfiguration := config_api_client.NewConfiguration()
uxiConfiguration.Host = host
uxiConfiguration.Scheme = "https"
uxiConfiguration.HTTPClient = getHttpClient(ctx, clientID, clientSecret, tokenURL)
uxiConfiguration.HTTPClient = getHttpClient(clientID, clientSecret, tokenURL)
uxiClient := config_api_client.NewAPIClient(uxiConfiguration)

// Make the client available during DataSource and Resource type Configure methods.
Expand Down Expand Up @@ -178,7 +178,7 @@ func (p *uxiConfigurationProvider) Resources(_ context.Context) []func() resourc
}
}

func getHttpClient(ctx context.Context, clientID string, clientSecret string, tokenURL string) *http.Client {
func getHttpClient(clientID string, clientSecret string, tokenURL string) *http.Client {
// Set up the client credentials config
config := &clientcredentials.Config{
ClientID: clientID,
Expand All @@ -188,5 +188,5 @@ func getHttpClient(ctx context.Context, clientID string, clientSecret string, to
}

// Create a context and fetch a token
return config.Client(ctx)
return config.Client(context.Background())
}

0 comments on commit e2864ea

Please sign in to comment.