MCPcopy Create free account
hub / github.com/basecamp/hey-cli / newAuthLogoutCommand

Function newAuthLogoutCommand

internal/cmd/auth.go:105–120  ·  view source on GitHub ↗

logout subcommand

()

Source from the content-addressed store, hash-verified

103 return writeOK(map[string]string{"method": "oauth"}, output.WithSummary("Logged in successfully"))
104 },
105 }
106
107 cmd.Flags().StringVar(&token, "token", "", "Pre-generated Bearer token")
108 cmd.Flags().StringVar(&cookie, "cookie", "", "Session cookie value from browser (session_token)")
109 cmd.Flags().BoolVar(&noBrowser, "no-browser", false, "Don't open browser, print URL instead")
110
111 return cmd
112}
113
114// logout subcommand
115
116func newAuthLogoutCommand() *cobra.Command {
117 return buildLogoutCommand("hey auth logout")
118}
119
120// buildLogoutCommand constructs a logout command whose example reads as the
121// given path. Shared by `hey auth logout` and the top-level `hey logout`.
122func buildLogoutCommand(path string) *cobra.Command {
123 return &cobra.Command{

Callers 1

newAuthCommandFunction · 0.85

Calls 4

WithSummaryFunction · 0.92
writeOKFunction · 0.85
LogoutMethod · 0.80
IsStyledMethod · 0.80

Tested by

no test coverage detected