From b2a5fdfa1e5d1424b5ed3691a7de59657d857766 Mon Sep 17 00:00:00 2001 From: morganelle Date: Thu, 29 Apr 2021 11:02:31 -0700 Subject: [PATCH 1/2] remove auth0.String from apiGrantsFor slice items --- integration/apps/client-id | 1 + internal/cli/apps.go | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 integration/apps/client-id diff --git a/integration/apps/client-id b/integration/apps/client-id new file mode 100644 index 000000000..7de6c13a5 --- /dev/null +++ b/integration/apps/client-id @@ -0,0 +1 @@ +5n3dYxj32rA0PhPdiiHv7myy4kXvYmyX diff --git a/internal/cli/apps.go b/internal/cli/apps.go index 6d702bb51..f4c174e82 100644 --- a/internal/cli/apps.go +++ b/internal/cli/apps.go @@ -739,25 +739,25 @@ func apiGrantsFor(s []string) []interface{} { for i, v := range s { switch strings.ToLower(v) { case "authorization-code", "code": - res[i] = auth0.String("authorization_code") + res[i] = "authorization_code" case "implicit": - res[i] = auth0.String("implicit") + res[i] = "implicit" case "refresh-token": - res[i] = auth0.String("refresh_token") + res[i] = "refresh_token" case "client-credentials", "credentials": - res[i] = auth0.String("client_credentials") + res[i] = "client_credentials" case "password": - res[i] = auth0.String("password") + res[i] = "password" case "password-realm": - res[i] = auth0.String("http://auth0.com/oauth/grant-type/password-realm") + res[i] = "http://auth0.com/oauth/grant-type/password-realm" case "mfa-oob": - res[i] = auth0.String("http://auth0.com/oauth/grant-type/mfa-oob") + res[i] = "http://auth0.com/oauth/grant-type/mfa-oob" case "mfa-otp": - res[i] = auth0.String("http://auth0.com/oauth/grant-type/mfa-otp") + res[i] = "http://auth0.com/oauth/grant-type/mfa-otp" case "mfa-recovery-code": - res[i] = auth0.String("http://auth0.com/oauth/grant-type/mfa-recovery-code") + res[i] = "http://auth0.com/oauth/grant-type/mfa-recovery-code" case "device-code": - res[i] = auth0.String("urn:ietf:params:oauth:grant-type:device_code") + res[i] = "urn:ietf:params:oauth:grant-type:device_code" default: } } From c498769da7fef85db8edf1c273862bde795b1592 Mon Sep 17 00:00:00 2001 From: morganelle Date: Thu, 29 Apr 2021 11:08:22 -0700 Subject: [PATCH 2/2] remove test file --- integration/apps/client-id | 1 - 1 file changed, 1 deletion(-) delete mode 100644 integration/apps/client-id diff --git a/integration/apps/client-id b/integration/apps/client-id deleted file mode 100644 index 7de6c13a5..000000000 --- a/integration/apps/client-id +++ /dev/null @@ -1 +0,0 @@ -5n3dYxj32rA0PhPdiiHv7myy4kXvYmyX