Skip to content

Commit e24f9a7

Browse files
authored
fix: CLI usage help examples (#3943)
1 parent 6ba6a43 commit e24f9a7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

cmd/cmd_create_client.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func NewCreateClientsCommand() *cobra.Command {
5757
Short: "Create an OAuth 2.0 Client",
5858
Aliases: []string{"client"},
5959
Args: cobra.NoArgs,
60-
Example: `{{ .CommandPath }} -n "my app" -c http://localhost/cb -g authorization_code -r code -a core,foobar
60+
Example: `{{ .CommandPath }} --name "my app" --redirect-uri http://localhost/cb --grant-type authorization_code --response-type code --scope core,foobar
6161
6262
Use the tool jq (or any other JSON tool) to get the OAuth2 Client ID and Secret:
6363
@@ -74,7 +74,7 @@ the Authorize Code, Implicit, Refresh flow. This command allows settings all fie
7474
7575
To encrypt an auto-generated OAuth2 Client Secret, use flags ` + "`--pgp-key`" + `, ` + "`--pgp-key-url`" + ` or ` + "`--keybase`" + ` flag, for example:
7676
77-
{{ .CommandPath }} -n "my app" -g client_credentials -r token -a core,foobar --keybase keybase_username
77+
{{ .CommandPath }} --name "my app" --grant-type client_credentials --response-type token --scope core,foobar --keybase keybase_username
7878
`,
7979
RunE: func(cmd *cobra.Command, args []string) error {
8080
m, _, err := cliclient.NewClient(cmd)

cmd/cmd_import_client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Alternatively:
4747
4848
To encrypt an auto-generated OAuth2 Client Secret, use flags ` + "`--pgp-key`" + `, ` + "`--pgp-key-url`" + ` or ` + "`--keybase`" + ` flag, for example:
4949
50-
{{ .CommandPath }} -n "my app" -g client_credentials -r token -a core,foobar --keybase keybase_username
50+
{{ .CommandPath }} --name "my app" --grant-type client_credentials --response-type token --scope core,foobar --keybase keybase_username
5151
`,
5252
Long: `This command reads in each listed JSON file and imports their contents as a list of OAuth 2.0 Clients.
5353

cmd/cmd_update_client.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ func NewUpdateClientCmd() *cobra.Command {
2222
Aliases: []string{"client"},
2323
Short: "Update an OAuth 2.0 Client",
2424
Args: cobra.ExactArgs(1),
25-
Example: `{{ .CommandPath }} <client-id-here> -c http://localhost/cb -g authorization_code -r code -a core,foobar
25+
Example: `{{ .CommandPath }} <client-id-here> --redirect-uri http://localhost/cb --grant-type authorization_code --response-type code --scope core,foobar
2626
2727
To encrypt an auto-generated OAuth2 Client Secret, use flags ` + "`--pgp-key`" + `, ` + "`--pgp-key-url`" + ` or ` + "`--keybase`" + ` flag, for example:
2828
29-
{{ .CommandPath }} e6e96aa5-9cd2-4a70-bf56-ad6434c8aaa2 -n "my app" -g client_credentials -r token -a core,foobar --keybase keybase_username
29+
{{ .CommandPath }} e6e96aa5-9cd2-4a70-bf56-ad6434c8aaa2 --name "my app" --grant-type client_credentials --response-type token --scope core,foobar --keybase keybase_username
3030
`,
3131
Long: `This command replaces an OAuth 2.0 Client by its ID. Please be aware that this command replaces the entire client. If only the name flag (-n "my updated app") is provided, the all other fields are updated to their default values.`,
3232
RunE: func(cmd *cobra.Command, args []string) error {

0 commit comments

Comments
 (0)