From efb95bb02759c01f2c2acfbded42ef0a3e402858 Mon Sep 17 00:00:00 2001 From: Rita Zerrizuela Date: Mon, 1 Mar 2021 01:45:09 -0300 Subject: [PATCH] Switch over api values --- internal/cli/apps.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/cli/apps.go b/internal/cli/apps.go index 109f99d67..a9c8b238c 100644 --- a/internal/cli/apps.go +++ b/internal/cli/apps.go @@ -454,15 +454,15 @@ func apiGrantsFor(s []string) []interface{} { } func apiDefaultGrantsFor(t string) []interface{} { - switch strings.ToLower(t) { + switch apiTypeFor(strings.ToLower(t)) { case "native": - return stringToInterfaceSlice([]string{"implicit", "authorization-code", "refresh-token"}) - case "spa", "single page web application": - return stringToInterfaceSlice([]string{"implicit", "authorization-code", "refresh-token"}) - case "regular", "regular web application": - return stringToInterfaceSlice([]string{"implicit", "authorization-code", "refresh-token", "client-credentials"}) - case "m2m", "machine to machine": - return stringToInterfaceSlice([]string{"client-credentials"}) + return stringToInterfaceSlice([]string{"implicit", "authorization_code", "refresh_token"}) + case "spa": + return stringToInterfaceSlice([]string{"implicit", "authorization_code", "refresh_token"}) + case "regular_web": + return stringToInterfaceSlice([]string{"implicit", "authorization_code", "refresh_token", "client_credentials"}) + case "non_interactive": + return stringToInterfaceSlice([]string{"client_credentials"}) default: return nil }