Skip to content

Commit

Permalink
Merge pull request #790 from purecloudlabs/DEVTOOLING-403
Browse files Browse the repository at this point in the history
DEVTOOLING-403: Adding expires-in to configuration struct
  • Loading branch information
dginty4 committed Mar 1, 2024
2 parents 9631efd + 3e3ebb1 commit 422af22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion resources/sdk/purecloudgo/templates/configuration.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type Configuration struct {
ShouldRefreshAccessToken bool `json:"shouldRefreshAccessToken,omitempty"`
RefreshInProgress int64 `json:"refreshInProgress,omitempty"`
RefreshTokenWaitTime int `json:"refreshTokenWaitTime,omitempty"`
AccessTokenExpiresIn int `json:"accessTokenExpiresIn,omitempty"`
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
APIClient APIClient `json:"APIClient,omitempty"`
Expand Down Expand Up @@ -434,7 +435,8 @@ func (c *Configuration) AuthorizeClientCredentials(clientID string, clientSecret
if c.AccessToken == "" {
return fmt.Errorf("Auth Error: No access token found")
}
c.AccessTokenExpiresIn = authResponse.ExpiresIn
return nil
}

Expand Down

0 comments on commit 422af22

Please sign in to comment.