MCPcopy Index your code
hub / github.com/jetify-com/devbox / logoutCmd

Function logoutCmd

internal/boxcli/auth.go:59–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57}
58
59func logoutCmd() *cobra.Command {
60 cmd := &cobra.Command{
61 Use: "logout",
62 Short: "Logout from devbox",
63 Args: cobra.ExactArgs(0),
64 RunE: func(cmd *cobra.Command, args []string) error {
65 c, err := identity.AuthClient(identity.AuthRedirectDefault)
66 if err != nil {
67 return err
68 }
69 err = c.LogoutFlow()
70 if err == nil {
71 fmt.Fprintln(cmd.OutOrStdout(), "Logged out successfully")
72 }
73 return err
74 },
75 }
76
77 return cmd
78}
79
80type whoAmICmdFlags struct {
81 showTokens bool

Callers 1

authCmdFunction · 0.85

Calls 1

AuthClientFunction · 0.92

Tested by

no test coverage detected