(config *storepb.IdentityProviderConfig)
| 24 | } |
| 25 | |
| 26 | func getConfigBytes(config *storepb.IdentityProviderConfig) ([]byte, error) { |
| 27 | if v := config.GetOauth2Config(); v != nil { |
| 28 | configBytes, err := protojson.Marshal(v) |
| 29 | return configBytes, err |
| 30 | } else if v := config.GetOidcConfig(); v != nil { |
| 31 | configBytes, err := protojson.Marshal(v) |
| 32 | return configBytes, err |
| 33 | } else if v := config.GetLdapConfig(); v != nil { |
| 34 | configBytes, err := protojson.Marshal(v) |
| 35 | return configBytes, err |
| 36 | } |
| 37 | return nil, errors.Errorf("unexpected provider type") |
| 38 | } |
| 39 | |
| 40 | // FindIdentityProviderMessage is the message for finding identity providers. |
| 41 | type FindIdentityProviderMessage struct { |
no test coverage detected