DeleteOAuth2ProviderApp deletes an application, also invalidating any tokens that were generated from it.
(ctx context.Context, id uuid.UUID)
| 119 | // DeleteOAuth2ProviderApp deletes an application, also invalidating any tokens |
| 120 | // that were generated from it. |
| 121 | func (c *Client) DeleteOAuth2ProviderApp(ctx context.Context, id uuid.UUID) error { |
| 122 | res, err := c.Request(ctx, http.MethodDelete, fmt.Sprintf("/api/v2/oauth2-provider/apps/%s", id), nil) |
| 123 | if err != nil { |
| 124 | return err |
| 125 | } |
| 126 | defer res.Body.Close() |
| 127 | if res.StatusCode != http.StatusNoContent { |
| 128 | return ReadBodyAsError(res) |
| 129 | } |
| 130 | return nil |
| 131 | } |
| 132 | |
| 133 | type OAuth2ProviderAppSecretFull struct { |
| 134 | ID uuid.UUID `json:"id" format:"uuid"` |