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

Add Name to the Oauth Client Payload #466

Merged
merged 1 commit into from Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,8 @@
# Unreleased

# v1.6.0
* Add `Name` field to `OAuthClient` by @barrettclark [#466](https://github.com/hashicorp/go-tfe/pull/466)

# v1.5.0

## Enhancements
Expand Down
1 change: 1 addition & 0 deletions oauth_client.go
Expand Up @@ -73,6 +73,7 @@ type OAuthClient struct {
HTTPURL string `jsonapi:"attr,http-url"`
Key string `jsonapi:"attr,key"`
RSAPublicKey string `jsonapi:"attr,rsa-public-key"`
Name *string `jsonapi:"attr,name"`
Secret string `jsonapi:"attr,secret"`
ServiceProvider ServiceProviderType `jsonapi:"attr,service-provider"`
ServiceProviderName string `jsonapi:"attr,service-provider-display-name"`
Expand Down
1 change: 1 addition & 0 deletions oauth_client_integration_test.go
Expand Up @@ -109,6 +109,7 @@ func TestOAuthClientsCreate(t *testing.T) {
oc, err := client.OAuthClients.Create(ctx, orgTest.Name, options)
require.NoError(t, err)
assert.NotEmpty(t, oc.ID)
assert.Nil(t, oc.Name)
assert.Equal(t, "https://api.github.com", oc.APIURL)
assert.Equal(t, "https://github.com", oc.HTTPURL)
assert.Equal(t, 1, len(oc.OAuthTokens))
Expand Down