From d4ce7d9dfe295100099a805dad9ae0f10c9d3e83 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Thu, 5 Oct 2023 10:39:22 +0200 Subject: [PATCH] DXCDT-545: Add `universal-login customize` command skeleton (#860) --- docs/auth0_universal-login.md | 1 + docs/auth0_universal-login_customize.md | 43 +++++++++++++++++++++++ docs/auth0_universal-login_show.md | 1 + docs/auth0_universal-login_update.md | 1 + internal/cli/universal_login.go | 1 + internal/cli/universal_login_customize.go | 26 ++++++++++++++ 6 files changed, 73 insertions(+) create mode 100644 docs/auth0_universal-login_customize.md create mode 100644 internal/cli/universal_login_customize.go diff --git a/docs/auth0_universal-login.md b/docs/auth0_universal-login.md index aa37307d2..45468c0a3 100644 --- a/docs/auth0_universal-login.md +++ b/docs/auth0_universal-login.md @@ -9,6 +9,7 @@ Manage a consistent, branded Universal Login experience that can handle all of y ## Commands +- [auth0 universal-login customize](auth0_universal-login_customize.md) - Customize the Universal Login experience - [auth0 universal-login prompts](auth0_universal-login_prompts.md) - Manage custom text for prompts - [auth0 universal-login show](auth0_universal-login_show.md) - Display the custom branding settings for Universal Login - [auth0 universal-login templates](auth0_universal-login_templates.md) - Manage custom Universal Login templates diff --git a/docs/auth0_universal-login_customize.md b/docs/auth0_universal-login_customize.md new file mode 100644 index 000000000..727ad77ed --- /dev/null +++ b/docs/auth0_universal-login_customize.md @@ -0,0 +1,43 @@ +--- +layout: default +parent: auth0 universal-login +has_toc: false +--- +# auth0 universal-login customize + +Customize and preview changes to the Universal Login experience. This command will open a webpage within your browser where you can edit and preview your branding changes. For a comprehensive list of editable parameters and their values please visit the [Management API Documentation](https://auth0.com/docs/api/management/v2). + +## Usage +``` +auth0 universal-login customize [flags] +``` + +## Examples + +``` + auth0 universal-login customize + auth0 ul customize +``` + + + + +## Inherited Flags + +``` + --debug Enable debug mode. + --no-color Disable colors. + --no-input Disable interactivity. + --tenant string Specific tenant to use. +``` + + +## Related Commands + +- [auth0 universal-login customize](auth0_universal-login_customize.md) - Customize the Universal Login experience +- [auth0 universal-login prompts](auth0_universal-login_prompts.md) - Manage custom text for prompts +- [auth0 universal-login show](auth0_universal-login_show.md) - Display the custom branding settings for Universal Login +- [auth0 universal-login templates](auth0_universal-login_templates.md) - Manage custom Universal Login templates +- [auth0 universal-login update](auth0_universal-login_update.md) - Update the custom branding settings for Universal Login + + diff --git a/docs/auth0_universal-login_show.md b/docs/auth0_universal-login_show.md index 21c49d6ce..53ab7fe33 100644 --- a/docs/auth0_universal-login_show.md +++ b/docs/auth0_universal-login_show.md @@ -40,6 +40,7 @@ auth0 universal-login show [flags] ## Related Commands +- [auth0 universal-login customize](auth0_universal-login_customize.md) - Customize the Universal Login experience - [auth0 universal-login prompts](auth0_universal-login_prompts.md) - Manage custom text for prompts - [auth0 universal-login show](auth0_universal-login_show.md) - Display the custom branding settings for Universal Login - [auth0 universal-login templates](auth0_universal-login_templates.md) - Manage custom Universal Login templates diff --git a/docs/auth0_universal-login_update.md b/docs/auth0_universal-login_update.md index 739b0b2df..30349e800 100644 --- a/docs/auth0_universal-login_update.md +++ b/docs/auth0_universal-login_update.md @@ -50,6 +50,7 @@ auth0 universal-login update [flags] ## Related Commands +- [auth0 universal-login customize](auth0_universal-login_customize.md) - Customize the Universal Login experience - [auth0 universal-login prompts](auth0_universal-login_prompts.md) - Manage custom text for prompts - [auth0 universal-login show](auth0_universal-login_show.md) - Display the custom branding settings for Universal Login - [auth0 universal-login templates](auth0_universal-login_templates.md) - Manage custom Universal Login templates diff --git a/internal/cli/universal_login.go b/internal/cli/universal_login.go index 9fae3eee9..6c7819930 100644 --- a/internal/cli/universal_login.go +++ b/internal/cli/universal_login.go @@ -63,6 +63,7 @@ func universalLoginCmd(cli *cli) *cobra.Command { cmd.SetUsageTemplate(resourceUsageTemplate()) + cmd.AddCommand(customizeUniversalLoginCmd(cli)) cmd.AddCommand(showUniversalLoginCmd(cli)) cmd.AddCommand(updateUniversalLoginCmd(cli)) cmd.AddCommand(universalLoginTemplatesCmd(cli)) diff --git a/internal/cli/universal_login_customize.go b/internal/cli/universal_login_customize.go new file mode 100644 index 000000000..bf0681d0b --- /dev/null +++ b/internal/cli/universal_login_customize.go @@ -0,0 +1,26 @@ +package cli + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +func customizeUniversalLoginCmd(_ *cli) *cobra.Command { + cmd := &cobra.Command{ + Use: "customize", + Args: cobra.NoArgs, + Short: "Customize the Universal Login experience", + Long: "Customize and preview changes to the Universal Login experience. This command will open a webpage " + + "within your browser where you can edit and preview your branding changes. For a comprehensive list of " + + "editable parameters and their values please visit the " + + "[Management API Documentation](https://auth0.com/docs/api/management/v2).", + Example: ` auth0 universal-login customize + auth0 ul customize`, + RunE: func(cmd *cobra.Command, args []string) error { + return fmt.Errorf("not yet implemented") + }, + } + + return cmd +}