Skip to content

Commit

Permalink
chore: bump dependencies and generate internal SDK aligned with the p…
Browse files Browse the repository at this point in the history
…ublished SDK (#3807)
  • Loading branch information
zepatrik authored Jul 31, 2024
1 parent 0b3ecfc commit 477abae
Show file tree
Hide file tree
Showing 54 changed files with 1,268 additions and 1,357 deletions.
2 changes: 1 addition & 1 deletion .docker/Dockerfile-build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21 AS builder
FROM golang:1.22 AS builder

WORKDIR /go/src/github.com/ory/hydra

Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile-hsm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21 AS builder
FROM golang:1.22 AS builder

WORKDIR /go/src/github.com/ory/hydra

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
fetch-depth: 2
- uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- name: Start service
run: ./test/conformance/start.sh
- name: Run tests
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
key: ${{ needs.sdk-generate.outputs.sdk-cache-key }}
- uses: actions/setup-go@v4
with:
go-version: "1.21"
go-version: "1.22"
- run: go list -json > go.list
- name: Run nancy
uses: sonatype-nexus-community/[email protected]
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
key: ${{ needs.sdk-generate.outputs.sdk-cache-key }}
- uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- name: Setup HSM libs and packages
run: |
sudo apt install -y softhsm opensc
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
- uses: ory/ci/checkout@master
- uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- uses: actions/cache@v2
with:
path: ./test/e2e/hydra
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- uses: actions/setup-go@v4
with:
go-version: "1.21"
go-version: "1.22"
- run: go version

# Initializes the CodeQL tools for scanning.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- run: make format
- name: Indicate formatting issues
run: git diff HEAD --exit-code --color
2 changes: 1 addition & 1 deletion .github/workflows/licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- uses: actions/setup-node@v2
with:
node-version: "18"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ sdk: .bin/swagger .bin/ory node_modules
--git-user-id ory \
--git-repo-id hydra-client-go/v2 \
--git-host github.com \
--api-name-suffix "Api" \
--api-name-suffix "API" \
--global-property apiTests=false

make format
Expand Down
42 changes: 21 additions & 21 deletions client/sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ func TestClientSDK(t *testing.T) {
c.GetConfig().Servers = hydra.ServerConfigurations{{URL: server.URL}}

t.Run("case=client default scopes are set", func(t *testing.T) {
result, _, err := c.OAuth2Api.CreateOAuth2Client(ctx).OAuth2Client(hydra.OAuth2Client{}).Execute()
result, _, err := c.OAuth2API.CreateOAuth2Client(ctx).OAuth2Client(hydra.OAuth2Client{}).Execute()
require.NoError(t, err)
assert.EqualValues(t, conf.DefaultClientScope(ctx), strings.Split(*result.Scope, " "))

_, err = c.OAuth2Api.DeleteOAuth2Client(ctx, *result.ClientId).Execute()
_, err = c.OAuth2API.DeleteOAuth2Client(ctx, *result.ClientId).Execute()
require.NoError(t, err)
})

Expand All @@ -95,7 +95,7 @@ func TestClientSDK(t *testing.T) {
// createClient.SecretExpiresAt = 10

// returned client is correct on Create
result, _, err := c.OAuth2Api.CreateOAuth2Client(ctx).OAuth2Client(createClient).Execute()
result, _, err := c.OAuth2API.CreateOAuth2Client(ctx).OAuth2Client(createClient).Execute()
require.NoError(t, err)
assert.NotEmpty(t, result.UpdatedAt)
assert.NotEmpty(t, result.CreatedAt)
Expand All @@ -109,31 +109,31 @@ func TestClientSDK(t *testing.T) {

// secret is not returned on GetOAuth2Client
compareClient.ClientSecret = pointerx.Ptr("")
gresult, _, err := c.OAuth2Api.GetOAuth2Client(context.Background(), *createClient.ClientId).Execute()
gresult, _, err := c.OAuth2API.GetOAuth2Client(context.Background(), *createClient.ClientId).Execute()
require.NoError(t, err)
assertx.EqualAsJSONExcept(t, compareClient, gresult, append(defaultIgnoreFields, "client_secret"))

// get client will return The request could not be authorized
gresult, _, err = c.OAuth2Api.GetOAuth2Client(context.Background(), "unknown").Execute()
gresult, _, err = c.OAuth2API.GetOAuth2Client(context.Background(), "unknown").Execute()
require.Error(t, err)
assert.Empty(t, gresult)
assert.True(t, strings.Contains(err.Error(), "404"), err.Error())

// listing clients returns the only added one
results, _, err := c.OAuth2Api.ListOAuth2Clients(context.Background()).PageSize(100).Execute()
results, _, err := c.OAuth2API.ListOAuth2Clients(context.Background()).PageSize(100).Execute()
require.NoError(t, err)
assert.Len(t, results, 1)
assertx.EqualAsJSONExcept(t, compareClient, results[0], append(defaultIgnoreFields, "client_secret"))

// SecretExpiresAt gets overwritten with 0 on Update
compareClient.ClientSecret = createClient.ClientSecret
uresult, _, err := c.OAuth2Api.SetOAuth2Client(context.Background(), *createClient.ClientId).OAuth2Client(createClient).Execute()
uresult, _, err := c.OAuth2API.SetOAuth2Client(context.Background(), *createClient.ClientId).OAuth2Client(createClient).Execute()
require.NoError(t, err)
assertx.EqualAsJSONExcept(t, compareClient, uresult, append(defaultIgnoreFields, "client_secret"))

// create another client
updateClient := createTestClient("foo")
uresult, _, err = c.OAuth2Api.SetOAuth2Client(context.Background(), *createClient.ClientId).OAuth2Client(updateClient).Execute()
uresult, _, err = c.OAuth2API.SetOAuth2Client(context.Background(), *createClient.ClientId).OAuth2Client(updateClient).Execute()
require.NoError(t, err)
assert.NotEqual(t, updateClient.ClientId, uresult.ClientId)
updateClient.ClientId = uresult.ClientId
Expand All @@ -142,35 +142,35 @@ func TestClientSDK(t *testing.T) {
// again, test if secret is not returned on Get
compareClient = updateClient
compareClient.ClientSecret = pointerx.Ptr("")
gresult, _, err = c.OAuth2Api.GetOAuth2Client(context.Background(), *updateClient.ClientId).Execute()
gresult, _, err = c.OAuth2API.GetOAuth2Client(context.Background(), *updateClient.ClientId).Execute()
require.NoError(t, err)
assertx.EqualAsJSONExcept(t, compareClient, gresult, append(defaultIgnoreFields, "client_secret"))

// client can not be found after being deleted
_, err = c.OAuth2Api.DeleteOAuth2Client(context.Background(), *updateClient.ClientId).Execute()
_, err = c.OAuth2API.DeleteOAuth2Client(context.Background(), *updateClient.ClientId).Execute()
require.NoError(t, err)

_, _, err = c.OAuth2Api.GetOAuth2Client(context.Background(), *updateClient.ClientId).Execute()
_, _, err = c.OAuth2API.GetOAuth2Client(context.Background(), *updateClient.ClientId).Execute()
require.Error(t, err)
})

t.Run("case=public client is transmitted without secret", func(t *testing.T) {
result, _, err := c.OAuth2Api.CreateOAuth2Client(context.Background()).OAuth2Client(hydra.OAuth2Client{
result, _, err := c.OAuth2API.CreateOAuth2Client(context.Background()).OAuth2Client(hydra.OAuth2Client{
TokenEndpointAuthMethod: pointerx.Ptr("none"),
}).Execute()
require.NoError(t, err)

assert.Equal(t, "", pointerx.Deref(result.ClientSecret))

result, _, err = c.OAuth2Api.CreateOAuth2Client(context.Background()).OAuth2Client(createTestClient("")).Execute()
result, _, err = c.OAuth2API.CreateOAuth2Client(context.Background()).OAuth2Client(createTestClient("")).Execute()
require.NoError(t, err)

assert.Equal(t, "secret", pointerx.Deref(result.ClientSecret))
})

t.Run("case=id can be set", func(t *testing.T) {
id := uuidx.NewV4().String()
result, _, err := c.OAuth2Api.CreateOAuth2Client(context.Background()).OAuth2Client(hydra.OAuth2Client{ClientId: pointerx.Ptr(id)}).Execute()
result, _, err := c.OAuth2API.CreateOAuth2Client(context.Background()).OAuth2Client(hydra.OAuth2Client{ClientId: pointerx.Ptr(id)}).Execute()
require.NoError(t, err)

assert.Equal(t, id, pointerx.Deref(result.ClientId))
Expand All @@ -182,14 +182,14 @@ func TestClientSDK(t *testing.T) {
value := "http://foo.bar"

cl := createTestClient("")
created, _, err := c.OAuth2Api.CreateOAuth2Client(context.Background()).OAuth2Client(cl).Execute()
created, _, err := c.OAuth2API.CreateOAuth2Client(context.Background()).OAuth2Client(cl).Execute()
require.NoError(t, err)
cl.ClientId = created.ClientId

expected := deepcopy.Copy(cl).(hydra.OAuth2Client)
expected.RedirectUris = append(expected.RedirectUris, value)

result, _, err := c.OAuth2Api.PatchOAuth2Client(context.Background(), *cl.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute()
result, _, err := c.OAuth2API.PatchOAuth2Client(context.Background(), *cl.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute()
require.NoError(t, err)
expected.CreatedAt = result.CreatedAt
expected.UpdatedAt = result.UpdatedAt
Expand All @@ -204,11 +204,11 @@ func TestClientSDK(t *testing.T) {
value := "foo"

client := createTestClient("")
created, res, err := c.OAuth2Api.CreateOAuth2Client(context.Background()).OAuth2Client(client).Execute()
created, res, err := c.OAuth2API.CreateOAuth2Client(context.Background()).OAuth2Client(client).Execute()
require.NoError(t, err, "%s", ioutilx.MustReadAll(res.Body))
client.ClientId = created.ClientId

_, _, err = c.OAuth2Api.PatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute()
_, _, err = c.OAuth2API.PatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute()
require.Error(t, err)
})

Expand All @@ -218,13 +218,13 @@ func TestClientSDK(t *testing.T) {
value := "http://foo.bar"

client := createTestClient("")
created, _, err := c.OAuth2Api.CreateOAuth2Client(context.Background()).OAuth2Client(client).Execute()
created, _, err := c.OAuth2API.CreateOAuth2Client(context.Background()).OAuth2Client(client).Execute()
require.NoError(t, err)
client.ClientId = created.ClientId

result1, _, err := c.OAuth2Api.PatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute()
result1, _, err := c.OAuth2API.PatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute()
require.NoError(t, err)
result2, _, err := c.OAuth2Api.PatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute()
result2, _, err := c.OAuth2API.PatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute()
require.NoError(t, err)

// secret hashes shouldn't change between these PUT calls
Expand Down
6 changes: 3 additions & 3 deletions cmd/cmd_create_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ To encrypt an auto-generated OAuth2 Client Secret, use flags ` + "`--pgp-key`" +
cl.ClientId = pointerx.Ptr(flagx.MustGetString(cmd, flagClientId))

//nolint:bodyclose
client, _, err := m.OAuth2Api.CreateOAuth2Client(cmd.Context()).OAuth2Client(cl).Execute()
client, _, err := m.OAuth2API.CreateOAuth2Client(cmd.Context()).OAuth2Client(cl).Execute()
if err != nil {
return cmdx.PrintOpenAPIError(cmd, err)
}

if client.ClientSecret == nil && len(secret) > 0 {
client.ClientSecret = pointerx.String(secret)
client.ClientSecret = pointerx.Ptr(secret)
}

if encryptSecret && client.ClientSecret != nil {
Expand All @@ -107,7 +107,7 @@ To encrypt an auto-generated OAuth2 Client Secret, use flags ` + "`--pgp-key`" +
return cmdx.FailSilently(cmd)
}

client.ClientSecret = pointerx.String(enc.Base64Encode())
client.ClientSecret = pointerx.Ptr(enc.Base64Encode())
}

cmdx.PrintRow(cmd, (*outputOAuth2Client)(client))
Expand Down
2 changes: 1 addition & 1 deletion cmd/cmd_create_jwks.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func NewCreateJWKSCmd() *cobra.Command {
}

//nolint:bodyclose
jwks, _, err := m.JwkApi.CreateJsonWebKeySet(context.Background(), args[0]).CreateJsonWebKeySet(hydra.CreateJsonWebKeySet{
jwks, _, err := m.JwkAPI.CreateJsonWebKeySet(context.Background(), args[0]).CreateJsonWebKeySet(hydra.CreateJsonWebKeySet{
Alg: flagx.MustGetString(cmd, alg),
Kid: kid,
Use: flagx.MustGetString(cmd, use),
Expand Down
2 changes: 1 addition & 1 deletion cmd/cmd_delete_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To delete OAuth 2.0 Clients with the owner of "[email protected]", run:
)

for _, c := range args {
_, err := m.OAuth2Api.DeleteOAuth2Client(cmd.Context(), c).Execute() //nolint:bodyclose
_, err := m.OAuth2API.DeleteOAuth2Client(cmd.Context(), c).Execute() //nolint:bodyclose
if err != nil {
failed[c] = cmdx.PrintOpenAPIError(cmd, err)
continue
Expand Down
2 changes: 1 addition & 1 deletion cmd/cmd_delete_jwks.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func NewDeleteJWKSCommand() *cobra.Command {
)

for _, c := range args {
_, err = m.JwkApi.DeleteJsonWebKeySet(context.Background(), c).Execute() //nolint:bodyclose
_, err = m.JwkAPI.DeleteJsonWebKeySet(context.Background(), c).Execute() //nolint:bodyclose
if err != nil {
return cmdx.PrintOpenAPIError(cmd, err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cmd_delete_tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func NewDeleteAccessTokensCmd() *cobra.Command {
}

clientID := args[0]
_, err = client.OAuth2Api.DeleteOAuth2Token(cmd.Context()).ClientId(clientID).Execute() //nolint:bodyclose
_, err = client.OAuth2API.DeleteOAuth2Token(cmd.Context()).ClientId(clientID).Execute() //nolint:bodyclose
if err != nil {
return cmdx.PrintOpenAPIError(cmd, err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cmd_get_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewGetClientsCmd() *cobra.Command {

clients := make([]hydra.OAuth2Client, 0, len(args))
for _, id := range args {
client, _, err := m.OAuth2Api.GetOAuth2Client(cmd.Context(), id).Execute() //nolint:bodyclose
client, _, err := m.OAuth2API.GetOAuth2Client(cmd.Context(), id).Execute() //nolint:bodyclose
if err != nil {
return cmdx.PrintOpenAPIError(cmd, err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cmd_get_jwks.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To get the JSON Web Key Set as only public keys:

var sets outputJSONWebKeyCollection
for _, set := range args {
key, _, err := m.JwkApi.GetJsonWebKeySet(cmd.Context(), set).Execute() //nolint:bodyclose
key, _, err := m.JwkAPI.GetJsonWebKeySet(cmd.Context(), set).Execute() //nolint:bodyclose
if err != nil {
return cmdx.PrintOpenAPIError(cmd, err)
}
Expand Down
40 changes: 20 additions & 20 deletions cmd/cmd_helper_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,35 @@ import (

func clientFromFlags(cmd *cobra.Command) hydra.OAuth2Client {
return hydra.OAuth2Client{
AccessTokenStrategy: pointerx.String(flagx.MustGetString(cmd, flagClientAccessTokenStrategy)),
AccessTokenStrategy: pointerx.Ptr(flagx.MustGetString(cmd, flagClientAccessTokenStrategy)),
AllowedCorsOrigins: flagx.MustGetStringSlice(cmd, flagClientAllowedCORSOrigin),
Audience: flagx.MustGetStringSlice(cmd, flagClientAudience),
BackchannelLogoutSessionRequired: pointerx.Bool(flagx.MustGetBool(cmd, flagClientBackChannelLogoutSessionRequired)),
BackchannelLogoutUri: pointerx.String(flagx.MustGetString(cmd, flagClientBackchannelLogoutCallback)),
ClientName: pointerx.String(flagx.MustGetString(cmd, flagClientName)),
ClientSecret: pointerx.String(flagx.MustGetString(cmd, flagClientSecret)),
ClientUri: pointerx.String(flagx.MustGetString(cmd, flagClientClientURI)),
BackchannelLogoutSessionRequired: pointerx.Ptr(flagx.MustGetBool(cmd, flagClientBackChannelLogoutSessionRequired)),
BackchannelLogoutUri: pointerx.Ptr(flagx.MustGetString(cmd, flagClientBackchannelLogoutCallback)),
ClientName: pointerx.Ptr(flagx.MustGetString(cmd, flagClientName)),
ClientSecret: pointerx.Ptr(flagx.MustGetString(cmd, flagClientSecret)),
ClientUri: pointerx.Ptr(flagx.MustGetString(cmd, flagClientClientURI)),
Contacts: flagx.MustGetStringSlice(cmd, flagClientContact),
FrontchannelLogoutSessionRequired: pointerx.Bool(flagx.MustGetBool(cmd, flagClientFrontChannelLogoutSessionRequired)),
FrontchannelLogoutUri: pointerx.String(flagx.MustGetString(cmd, flagClientFrontChannelLogoutCallback)),
FrontchannelLogoutSessionRequired: pointerx.Ptr(flagx.MustGetBool(cmd, flagClientFrontChannelLogoutSessionRequired)),
FrontchannelLogoutUri: pointerx.Ptr(flagx.MustGetString(cmd, flagClientFrontChannelLogoutCallback)),
GrantTypes: flagx.MustGetStringSlice(cmd, flagClientGrantType),
JwksUri: pointerx.String(flagx.MustGetString(cmd, flagClientJWKSURI)),
LogoUri: pointerx.String(flagx.MustGetString(cmd, flagClientLogoURI)),
JwksUri: pointerx.Ptr(flagx.MustGetString(cmd, flagClientJWKSURI)),
LogoUri: pointerx.Ptr(flagx.MustGetString(cmd, flagClientLogoURI)),
Metadata: json.RawMessage(flagx.MustGetString(cmd, flagClientMetadata)),
Owner: pointerx.String(flagx.MustGetString(cmd, flagClientOwner)),
PolicyUri: pointerx.String(flagx.MustGetString(cmd, flagClientPolicyURI)),
Owner: pointerx.Ptr(flagx.MustGetString(cmd, flagClientOwner)),
PolicyUri: pointerx.Ptr(flagx.MustGetString(cmd, flagClientPolicyURI)),
PostLogoutRedirectUris: flagx.MustGetStringSlice(cmd, flagClientPostLogoutCallback),
RedirectUris: flagx.MustGetStringSlice(cmd, flagClientRedirectURI),
RequestObjectSigningAlg: pointerx.String(flagx.MustGetString(cmd, flagClientRequestObjectSigningAlg)),
RequestObjectSigningAlg: pointerx.Ptr(flagx.MustGetString(cmd, flagClientRequestObjectSigningAlg)),
RequestUris: flagx.MustGetStringSlice(cmd, flagClientRequestURI),
ResponseTypes: flagx.MustGetStringSlice(cmd, flagClientResponseType),
Scope: pointerx.String(strings.Join(flagx.MustGetStringSlice(cmd, flagClientScope), " ")),
SkipConsent: pointerx.Bool(flagx.MustGetBool(cmd, flagClientSkipConsent)),
SkipLogoutConsent: pointerx.Bool(flagx.MustGetBool(cmd, flagClientLogoutSkipConsent)),
SectorIdentifierUri: pointerx.String(flagx.MustGetString(cmd, flagClientSectorIdentifierURI)),
SubjectType: pointerx.String(flagx.MustGetString(cmd, flagClientSubjectType)),
TokenEndpointAuthMethod: pointerx.String(flagx.MustGetString(cmd, flagClientTokenEndpointAuthMethod)),
TosUri: pointerx.String(flagx.MustGetString(cmd, flagClientTOSURI)),
Scope: pointerx.Ptr(strings.Join(flagx.MustGetStringSlice(cmd, flagClientScope), " ")),
SkipConsent: pointerx.Ptr(flagx.MustGetBool(cmd, flagClientSkipConsent)),
SkipLogoutConsent: pointerx.Ptr(flagx.MustGetBool(cmd, flagClientLogoutSkipConsent)),
SectorIdentifierUri: pointerx.Ptr(flagx.MustGetString(cmd, flagClientSectorIdentifierURI)),
SubjectType: pointerx.Ptr(flagx.MustGetString(cmd, flagClientSubjectType)),
TokenEndpointAuthMethod: pointerx.Ptr(flagx.MustGetString(cmd, flagClientTokenEndpointAuthMethod)),
TosUri: pointerx.Ptr(flagx.MustGetString(cmd, flagClientTOSURI)),
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/cmd_import_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Please be aware that this command does not update existing clients. If the clien

for src, cc := range clients {
for _, c := range cc {
result, _, err := m.OAuth2Api.CreateOAuth2Client(cmd.Context()).OAuth2Client(c).Execute() //nolint:bodyclose
result, _, err := m.OAuth2API.CreateOAuth2Client(cmd.Context()).OAuth2Client(c).Execute() //nolint:bodyclose
if err != nil {
failed[src] = cmdx.PrintOpenAPIError(cmd, err)
continue
Expand Down
Loading

0 comments on commit 477abae

Please sign in to comment.