From d5cc934547a0b073f83fa52a10b5e0581358f8a5 Mon Sep 17 00:00:00 2001 From: Rita Zerrizuela Date: Sat, 29 May 2021 00:29:57 -0300 Subject: [PATCH] Add scopes flag to `test login` (#305) --- internal/cli/test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/cli/test.go b/internal/cli/test.go index 17bbebf0c..58bfa1e1d 100644 --- a/internal/cli/test.go +++ b/internal/cli/test.go @@ -49,7 +49,7 @@ var ( Name: "Scopes", LongForm: "scopes", ShortForm: "s", - Help: "The list of scope you want to use to generate the token.", + Help: "The list of scopes you want to use.", } testDomainArg = Argument{ @@ -85,6 +85,7 @@ func testLoginCmd(cli *cli) *cobra.Command { var inputs struct { ClientID string Audience string + Scopes []string ConnectionName string CustomDomain string } @@ -157,7 +158,7 @@ auth0 test login --connection `, inputs.ConnectionName, inputs.Audience, // audience is only supported for the test token command "login", // force a login page when using the test login command - cliLoginTestingScopes, + inputs.Scopes, inputs.CustomDomain, ) if err != nil { @@ -195,6 +196,7 @@ auth0 test login --connection `, cmd.SetUsageTemplate(resourceUsageTemplate()) testAudience.RegisterString(cmd, &inputs.Audience, "") + testScopes.RegisterStringSlice(cmd, &inputs.Scopes, cliLoginTestingScopes) testConnection.RegisterString(cmd, &inputs.ConnectionName, "") testDomain.RegisterString(cmd, &inputs.CustomDomain, "") return cmd