()
| 132 | } |
| 133 | |
| 134 | func newDebugOAuthRemoveCmd() *cobra.Command { |
| 135 | return &cobra.Command{ |
| 136 | Use: "remove <resource-url>", |
| 137 | Short: "Remove a stored OAuth token", |
| 138 | Args: cobra.ExactArgs(1), |
| 139 | RunE: func(cmd *cobra.Command, args []string) (commandErr error) { |
| 140 | ctx := cmd.Context() |
| 141 | telemetry.TrackCommand(ctx, "debug", []string{"oauth", "remove"}) |
| 142 | defer func() { |
| 143 | telemetry.TrackCommandError(ctx, "debug", []string{"oauth", "remove"}, commandErr) |
| 144 | }() |
| 145 | |
| 146 | if err := mcp.RemoveOAuthToken(args[0]); err != nil { |
| 147 | return err |
| 148 | } |
| 149 | |
| 150 | fmt.Fprintf(cmd.OutOrStdout(), "Removed OAuth token for %s\n", args[0]) |
| 151 | return nil |
| 152 | }, |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | func newDebugOAuthLoginCmd() *cobra.Command { |
| 157 | var flags debugFlags |
no test coverage detected