Skip to content

Commit

Permalink
Remove unused fields
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorcast-db committed May 13, 2024
1 parent 82c609e commit b7c06af
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions httpclient/oauth_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ type GetOAuthTokenRequest struct {
GrantType string `url:"grant_type"`
AuthorizationDetails string `url:"authorization_details"`
Assertion string `url:"assertion"`
ExpiresIn int `url:"expires_in,omitempty"`
RefreshToken bool `url:"refresh_token,omitempty"`
}

// Returns a new OAuth token using the provided token. The token must be a JWT token.
Expand All @@ -30,10 +28,6 @@ func (c *ApiClient) GetOAuthToken(authDetails string, token *oauth2.Token) (*cre
GrantType: "urn:ietf:params:oauth:grant-type:jwt-bearer",
AuthorizationDetails: authDetails,
Assertion: token.AccessToken,
// By default, the tokens API does not refresh the token, so you can get a token that is about to expire.
// We keep a cache of the Tokens, and only request when a new one is needed
ExpiresIn: 3600,
RefreshToken: true,
}
var response credentials.OAuthToken
opts := []DoOption{
Expand Down

0 comments on commit b7c06af

Please sign in to comment.