MCPcopy Create free account
hub / github.com/auth0/auth0-cli / apiGrantsFor

Function apiGrantsFor

internal/cli/apps.go:1015–1045  ·  view source on GitHub ↗
(s []string)

Source from the content-addressed store, hash-verified

1013}
1014
1015func apiGrantsFor(s []string) *[]string {
1016 res := make([]string, len(s))
1017
1018 for i, v := range s {
1019 switch strings.ToLower(v) {
1020 case "authorization-code", "code":
1021 res[i] = "authorization_code"
1022 case "implicit":
1023 res[i] = "implicit"
1024 case "refresh-token":
1025 res[i] = "refresh_token"
1026 case "client-credentials", "credentials":
1027 res[i] = "client_credentials"
1028 case "password":
1029 res[i] = "password"
1030 case "password-realm":
1031 res[i] = "http://auth0.com/oauth/grant-type/password-realm"
1032 case "mfa-oob":
1033 res[i] = "http://auth0.com/oauth/grant-type/mfa-oob"
1034 case "mfa-otp":
1035 res[i] = "http://auth0.com/oauth/grant-type/mfa-otp"
1036 case "mfa-recovery-code":
1037 res[i] = "http://auth0.com/oauth/grant-type/mfa-recovery-code"
1038 case "device-code":
1039 res[i] = "urn:ietf:params:oauth:grant-type:device_code"
1040 default:
1041 }
1042 }
1043
1044 return &res
1045}
1046
1047func apiDefaultGrantsFor(t string) *[]string {
1048 switch apiTypeFor(strings.ToLower(t)) {

Callers 2

createAppCmdFunction · 0.85
updateAppCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected