Skip to content

Commit

Permalink
Switch over api values
Browse files Browse the repository at this point in the history
  • Loading branch information
Widcket committed Mar 1, 2021
1 parent 7d7930b commit efb95bb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions internal/cli/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit efb95bb

Please sign in to comment.