Skip to content

Commit

Permalink
Add scopes flag to test login (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
Widcket authored May 29, 2021
1 parent f0f9ca4 commit d5cc934
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/cli/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -85,6 +85,7 @@ func testLoginCmd(cli *cli) *cobra.Command {
var inputs struct {
ClientID string
Audience string
Scopes []string
ConnectionName string
CustomDomain string
}
Expand Down Expand Up @@ -157,7 +158,7 @@ auth0 test login <client-id> --connection <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 {
Expand Down Expand Up @@ -195,6 +196,7 @@ auth0 test login <client-id> --connection <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
Expand Down

0 comments on commit d5cc934

Please sign in to comment.