Skip to content

Commit

Permalink
Merge pull request #10 from ConductorOne/jirwin/fix-list-identity-pro…
Browse files Browse the repository at this point in the history
…viders

Identity providers are returned as an array
  • Loading branch information
jirwin authored Feb 2, 2024
2 parents 62386ba + 3e79c40 commit 6ce667d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/sac/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,12 @@ func (c *Client) ListIdentityProviderIds(ctx context.Context) ([]string, error)
q := url.Values{}
q.Set("includeLocal", "true")

var res struct {
IdPs []IdentityProvider
}
var res []IdentityProvider
if err := c.doRequest(ctx, providersUrl, &res, q); err != nil {
return nil, err
}

for _, identityProvider := range res.IdPs {
for _, identityProvider := range res {
providerIds = append(providerIds, identityProvider.ID)
}

Expand Down

0 comments on commit 6ce667d

Please sign in to comment.