(t string)
| 1045 | } |
| 1046 | |
| 1047 | func 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 | |
| 1064 | func typeFor(s *string) *string { |
| 1065 | switch apiTypeFor(strings.ToLower(auth0.StringValue(s))) { |
no test coverage detected