IMsalSFHttpClientFactory.GetHttpClient Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Method returning an HTTP client that will be used to validate the server certificate through the provided callback. This method is useful when custom certificate validation logic is required, for the managed identity flow running on a service fabric cluster.
public System.Net.Http.HttpClient GetHttpClient(Func<System.Net.Http.HttpRequestMessage,System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,bool> validateServerCert);
abstract member GetHttpClient : Func<System.Net.Http.HttpRequestMessage, System.Security.Cryptography.X509Certificates.X509Certificate2, System.Security.Cryptography.X509Certificates.X509Chain, System.Net.Security.SslPolicyErrors, bool> -> System.Net.Http.HttpClient
Public Function GetHttpClient (validateServerCert As Func(Of HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, Boolean)) As HttpClient
Parameters
- validateServerCert
- Func<HttpRequestMessage,X509Certificate2,X509Chain,SslPolicyErrors,Boolean>
Callback to validate the server certificate for the Service Fabric.
Returns
An HTTP client configured with the provided server certificate validation callback.