We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2ab2ca commit 5b7a14bCopy full SHA for 5b7a14b
internal/boxcli/auth.go
@@ -75,7 +75,12 @@ func logoutCmd() *cobra.Command {
75
return cmd
76
}
77
78
+type whoAmICmdFlags struct {
79
+ showTokens bool
80
+}
81
+
82
func whoAmICmd() *cobra.Command {
83
+ flags := &whoAmICmdFlags{}
84
cmd := &cobra.Command{
85
Use: "whoami",
86
Short: "Show the current user",
@@ -90,10 +95,17 @@ func whoAmICmd() *cobra.Command {
90
95
return err
91
96
92
97
return box.UninitializedSecrets(cmd.Context()).
93
- WhoAmI(cmd.Context(), cmd.OutOrStdout(), false)
98
+ WhoAmI(cmd.Context(), cmd.OutOrStdout(), flags.showTokens)
94
99
},
100
101
102
+ cmd.Flags().BoolVar(
103
+ &flags.showTokens,
104
+ "show-tokens",
105
+ false,
106
+ "Show the access, id, and refresh tokens",
107
+ )
108
109
110
111
0 commit comments