private static void ConfigureAuthentication(HttpTransportBindingElement http, HttpTransportSecurity transportSecurity) { transportSecurity._clientCredentialType = HttpClientCredentialTypeHelper.MapToClientCredentialType(http.AuthenticationScheme); transportSecurity.Realm = http.Realm; transportSecurity._extendedProtectionPolicy = http.ExtendedProtectionPolicy; }
internal static void ConfigureTransportProtectionAndAuthentication(HttpsTransportBindingElement https, HttpTransportSecurity transportSecurity) { ConfigureAuthentication(https, transportSecurity); if (https.RequireClientCertificate) { transportSecurity.ClientCredentialType = HttpClientCredentialType.Certificate; } }