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

Function apiDefaultGrantsFor

internal/cli/apps.go:1047–1062  ·  view source on GitHub ↗
(t string)

Source from the content-addressed store, hash-verified

1045}
1046
1047func apiDefaultGrantsFor(t string) *[]string {
1048 switch apiTypeFor(strings.ToLower(t)) {
1049 case appTypeNative:
1050 return &[]string{"implicit", "authorization_code", "refresh_token"}
1051 case appTypeSPA:
1052 return &[]string{"implicit", "authorization_code", "refresh_token"}
1053 case appTypeRegularWeb:
1054 return &[]string{"implicit", "authorization_code", "refresh_token", "client_credentials"}
1055 case appTypeNonInteractive:
1056 return &[]string{"client_credentials"}
1057 case appTypeResourceServer:
1058 return &[]string{"urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token"}
1059 default:
1060 return nil
1061 }
1062}
1063
1064func typeFor(s *string) *string {
1065 switch apiTypeFor(strings.ToLower(auth0.StringValue(s))) {

Callers 1

createAppCmdFunction · 0.85

Calls 1

apiTypeForFunction · 0.85

Tested by

no test coverage detected