mirror of
https://github.com/photoprism/photoprism.git
synced 2025-10-05 08:47:12 +08:00
Auth: Improve API authentication subcommand usage information #808
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -33,8 +33,8 @@ var AuthAddFlags = []cli.Flag{
|
|||||||
// AuthAddCommand configures the command name, flags, and action.
|
// AuthAddCommand configures the command name, flags, and action.
|
||||||
var AuthAddCommand = cli.Command{
|
var AuthAddCommand = cli.Command{
|
||||||
Name: "add",
|
Name: "add",
|
||||||
Usage: "Creates a new client access token",
|
Usage: "Creates a new access token for client authentication",
|
||||||
Description: "Specifying a username as argument creates a personal access token for a registered user account.",
|
Description: "If you provide a username as argument, a personal access token for registered users will be created.",
|
||||||
ArgsUsage: "[username]",
|
ArgsUsage: "[username]",
|
||||||
Flags: AuthAddFlags,
|
Flags: AuthAddFlags,
|
||||||
Action: authAddAction,
|
Action: authAddAction,
|
||||||
|
@@ -14,7 +14,7 @@ import (
|
|||||||
// AuthListCommand configures the command name, flags, and action.
|
// AuthListCommand configures the command name, flags, and action.
|
||||||
var AuthListCommand = cli.Command{
|
var AuthListCommand = cli.Command{
|
||||||
Name: "ls",
|
Name: "ls",
|
||||||
Usage: "Lists authenticated users and API clients",
|
Usage: "Lists currently authenticated users and clients",
|
||||||
ArgsUsage: "[search]",
|
ArgsUsage: "[search]",
|
||||||
Flags: append(report.CliFlags, countFlag, tokensFlag),
|
Flags: append(report.CliFlags, countFlag, tokensFlag),
|
||||||
Action: authListAction,
|
Action: authListAction,
|
||||||
|
@@ -15,8 +15,8 @@ import (
|
|||||||
// AuthRemoveCommand configures the command name, flags, and action.
|
// AuthRemoveCommand configures the command name, flags, and action.
|
||||||
var AuthRemoveCommand = cli.Command{
|
var AuthRemoveCommand = cli.Command{
|
||||||
Name: "rm",
|
Name: "rm",
|
||||||
Usage: "Deletes the specified session or access token",
|
Usage: "Deletes a session by id or access token",
|
||||||
ArgsUsage: "[id]",
|
ArgsUsage: "[identifier]",
|
||||||
Action: authRemoveAction,
|
Action: authRemoveAction,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@ import (
|
|||||||
// AuthResetCommand configures the command name, flags, and action.
|
// AuthResetCommand configures the command name, flags, and action.
|
||||||
var AuthResetCommand = cli.Command{
|
var AuthResetCommand = cli.Command{
|
||||||
Name: "reset",
|
Name: "reset",
|
||||||
Usage: "Removes all registered user and client sessions",
|
Usage: "Resets the authentication of all users and clients",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "trace, t",
|
Name: "trace, t",
|
||||||
|
@@ -14,8 +14,8 @@ import (
|
|||||||
// AuthShowCommand configures the command name, flags, and action.
|
// AuthShowCommand configures the command name, flags, and action.
|
||||||
var AuthShowCommand = cli.Command{
|
var AuthShowCommand = cli.Command{
|
||||||
Name: "show",
|
Name: "show",
|
||||||
Usage: "Shows details of the specified session or access token",
|
Usage: "Shows detailed information about a session",
|
||||||
ArgsUsage: "[id]",
|
ArgsUsage: "[identifier]",
|
||||||
Flags: report.CliFlags,
|
Flags: report.CliFlags,
|
||||||
Action: authShowAction,
|
Action: authShowAction,
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@ import (
|
|||||||
var ClientsModCommand = cli.Command{
|
var ClientsModCommand = cli.Command{
|
||||||
Name: "mod",
|
Name: "mod",
|
||||||
Usage: "Updates client application settings",
|
Usage: "Updates client application settings",
|
||||||
ArgsUsage: "[id]",
|
ArgsUsage: "[client id]",
|
||||||
Flags: ClientModFlags,
|
Flags: ClientModFlags,
|
||||||
Action: clientsModAction,
|
Action: clientsModAction,
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,7 @@ import (
|
|||||||
var ClientsRemoveCommand = cli.Command{
|
var ClientsRemoveCommand = cli.Command{
|
||||||
Name: "rm",
|
Name: "rm",
|
||||||
Usage: "Deletes the specified client application",
|
Usage: "Deletes the specified client application",
|
||||||
ArgsUsage: "[id]",
|
ArgsUsage: "[client id]",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "force, f",
|
Name: "force, f",
|
||||||
|
@@ -15,7 +15,7 @@ import (
|
|||||||
var ClientsShowCommand = cli.Command{
|
var ClientsShowCommand = cli.Command{
|
||||||
Name: "show",
|
Name: "show",
|
||||||
Usage: "Shows client configuration details",
|
Usage: "Shows client configuration details",
|
||||||
ArgsUsage: "[id]",
|
ArgsUsage: "[client id]",
|
||||||
Flags: report.CliFlags,
|
Flags: report.CliFlags,
|
||||||
Action: clientsShowAction,
|
Action: clientsShowAction,
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user