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)
| 174 | // DeleteOAuth2ProviderAppSecret deletes a secret from an OAuth2 application, |
| 175 | // also invalidating any tokens that generated from it. |
| 176 | func (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 | |
| 188 | type OAuth2ProviderGrantType string |
| 189 |