MCPcopy Index your code
hub / github.com/coder/coder / DeleteOAuth2ProviderAppSecret

Method DeleteOAuth2ProviderAppSecret

codersdk/oauth2.go:176–186  ·  view source on GitHub ↗

DeleteOAuth2ProviderAppSecret deletes a secret from an OAuth2 application, also invalidating any tokens that generated from it.

(ctx context.Context, appID uuid.UUID, secretID uuid.UUID)

Source from the content-addressed store, hash-verified

174// DeleteOAuth2ProviderAppSecret deletes a secret from an OAuth2 application,
175// also invalidating any tokens that generated from it.
176func (c *Client) DeleteOAuth2ProviderAppSecret(ctx context.Context, appID uuid.UUID, secretID uuid.UUID) error {
177 res, err := c.Request(ctx, http.MethodDelete, fmt.Sprintf("/api/v2/oauth2-provider/apps/%s/secrets/%s", appID, secretID), nil)
178 if err != nil {
179 return err
180 }
181 defer res.Body.Close()
182 if res.StatusCode != http.StatusNoContent {
183 return ReadBodyAsError(res)
184 }
185 return nil
186}
187
188type OAuth2ProviderGrantType string
189

Callers 2

TestOAuth2ProviderRevokeFunction · 0.80

Calls 3

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65

Tested by 2

TestOAuth2ProviderRevokeFunction · 0.64