From d70e7dd06da0ff7be3fd8f39a4026ceddf4fa34a Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 18 Jan 2024 17:53:53 +0100 Subject: [PATCH] Auth: Improve API authentication subcommand usage information #808 Signed-off-by: Michael Mayer --- internal/commands/auth_add.go | 4 ++-- internal/commands/auth_list.go | 2 +- internal/commands/auth_remove.go | 4 ++-- internal/commands/auth_reset.go | 2 +- internal/commands/auth_show.go | 4 ++-- internal/commands/clients_mod.go | 2 +- internal/commands/clients_remove.go | 2 +- internal/commands/clients_show.go | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/internal/commands/auth_add.go b/internal/commands/auth_add.go index f1f97ebe9..e34e8140f 100644 --- a/internal/commands/auth_add.go +++ b/internal/commands/auth_add.go @@ -33,8 +33,8 @@ var AuthAddFlags = []cli.Flag{ // AuthAddCommand configures the command name, flags, and action. var AuthAddCommand = cli.Command{ Name: "add", - Usage: "Creates a new client access token", - Description: "Specifying a username as argument creates a personal access token for a registered user account.", + Usage: "Creates a new access token for client authentication", + Description: "If you provide a username as argument, a personal access token for registered users will be created.", ArgsUsage: "[username]", Flags: AuthAddFlags, Action: authAddAction, diff --git a/internal/commands/auth_list.go b/internal/commands/auth_list.go index 348816fa2..d721bb4e1 100644 --- a/internal/commands/auth_list.go +++ b/internal/commands/auth_list.go @@ -14,7 +14,7 @@ import ( // AuthListCommand configures the command name, flags, and action. var AuthListCommand = cli.Command{ Name: "ls", - Usage: "Lists authenticated users and API clients", + Usage: "Lists currently authenticated users and clients", ArgsUsage: "[search]", Flags: append(report.CliFlags, countFlag, tokensFlag), Action: authListAction, diff --git a/internal/commands/auth_remove.go b/internal/commands/auth_remove.go index 83cbd8bd8..97f33228c 100644 --- a/internal/commands/auth_remove.go +++ b/internal/commands/auth_remove.go @@ -15,8 +15,8 @@ import ( // AuthRemoveCommand configures the command name, flags, and action. var AuthRemoveCommand = cli.Command{ Name: "rm", - Usage: "Deletes the specified session or access token", - ArgsUsage: "[id]", + Usage: "Deletes a session by id or access token", + ArgsUsage: "[identifier]", Action: authRemoveAction, } diff --git a/internal/commands/auth_reset.go b/internal/commands/auth_reset.go index b77290a27..fe3e70e6c 100644 --- a/internal/commands/auth_reset.go +++ b/internal/commands/auth_reset.go @@ -15,7 +15,7 @@ import ( // AuthResetCommand configures the command name, flags, and action. var AuthResetCommand = cli.Command{ Name: "reset", - Usage: "Removes all registered user and client sessions", + Usage: "Resets the authentication of all users and clients", Flags: []cli.Flag{ cli.BoolFlag{ Name: "trace, t", diff --git a/internal/commands/auth_show.go b/internal/commands/auth_show.go index 92a83d438..56e8b640e 100644 --- a/internal/commands/auth_show.go +++ b/internal/commands/auth_show.go @@ -14,8 +14,8 @@ import ( // AuthShowCommand configures the command name, flags, and action. var AuthShowCommand = cli.Command{ Name: "show", - Usage: "Shows details of the specified session or access token", - ArgsUsage: "[id]", + Usage: "Shows detailed information about a session", + ArgsUsage: "[identifier]", Flags: report.CliFlags, Action: authShowAction, } diff --git a/internal/commands/clients_mod.go b/internal/commands/clients_mod.go index 38ce063a4..deb6b49e4 100644 --- a/internal/commands/clients_mod.go +++ b/internal/commands/clients_mod.go @@ -16,7 +16,7 @@ import ( var ClientsModCommand = cli.Command{ Name: "mod", Usage: "Updates client application settings", - ArgsUsage: "[id]", + ArgsUsage: "[client id]", Flags: ClientModFlags, Action: clientsModAction, } diff --git a/internal/commands/clients_remove.go b/internal/commands/clients_remove.go index 82efbe49a..5c3776413 100644 --- a/internal/commands/clients_remove.go +++ b/internal/commands/clients_remove.go @@ -15,7 +15,7 @@ import ( var ClientsRemoveCommand = cli.Command{ Name: "rm", Usage: "Deletes the specified client application", - ArgsUsage: "[id]", + ArgsUsage: "[client id]", Flags: []cli.Flag{ cli.BoolFlag{ Name: "force, f", diff --git a/internal/commands/clients_show.go b/internal/commands/clients_show.go index e60cef229..cad502a05 100644 --- a/internal/commands/clients_show.go +++ b/internal/commands/clients_show.go @@ -15,7 +15,7 @@ import ( var ClientsShowCommand = cli.Command{ Name: "show", Usage: "Shows client configuration details", - ArgsUsage: "[id]", + ArgsUsage: "[client id]", Flags: report.CliFlags, Action: clientsShowAction, }