in FirebaseAdmin/FirebaseAdmin/Auth/Providers/SamlProviderConfigArgs.cs [161:188]
private void ValidateIdpConfigForUpdate(SamlProviderConfig.IdpConfig idpConfig)
{
if (idpConfig.IdpEntityId == string.Empty)
{
throw new ArgumentException("IDP entity ID must not be empty.");
}
var ssoUrl = idpConfig.SsoUrl;
if (ssoUrl == string.Empty)
{
throw new ArgumentException("SSO URL must not be empty.");
}
else if (ssoUrl != null && !IsWellFormedUriString(ssoUrl))
{
throw new ArgumentException($"Malformed SSO URL: {ssoUrl}");
}
var certs = idpConfig.IdpCertificates;
if (certs?.Count() == 0)
{
throw new ArgumentException("X509 certificates must not be empty.");
}
else if (certs?.Any((cert) => string.IsNullOrEmpty(cert.X509Certificate)) ?? false)
{
throw new ArgumentException(
"X509 certificates must not contain null or empty values.");
}
}