I am trying to connect to the Sharepoint site rest services which uses the NTLM/Kerberos authentication from our Web API that we are building. I have done basic authentication before by giving the credentials in the web.config like
var byteArray_Core = Encoding.ASCII.GetBytes(userName_Core + ":" + password_Core);
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray_Core));
Can we use HttpClient if we are connecting to the rest services that uses NTLM/Kerberos authentication. How do we modify the above code to use NTLM/Kerberos authentication instead of Basic. If the API we are building which calls the sharepoint site that is hosted in our server which credentials will it be using?