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

Method DeleteOAuth2ProviderApp

codersdk/oauth2.go:121–131  ·  view source on GitHub ↗

DeleteOAuth2ProviderApp deletes an application, also invalidating any tokens that were generated from it.

(ctx context.Context, id uuid.UUID)

Source from the content-addressed store, hash-verified

119// DeleteOAuth2ProviderApp deletes an application, also invalidating any tokens
120// that were generated from it.
121func (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
133type OAuth2ProviderAppSecretFull struct {
134 ID uuid.UUID `json:"id" format:"uuid"`

Callers 4

TestOAuth2ProviderRevokeFunction · 0.80
CleanupOAuth2AppFunction · 0.80

Calls 3

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65

Tested by 3

TestOAuth2ProviderRevokeFunction · 0.64