locked
Implement kerberos security with Httpclient - .Net Core 2.0 RRS feed

  • Question

  • User919378809 posted

    Hi,

    We have a requirement to implement kerberos security in Httpclient to call the Rest API.  Please let me know how will I add kerberos security information in Httpclient.

    Software: .Net Core 2.0

    Thanks

    Selvakumar R

    Friday, August 10, 2018 9:41 PM

All replies

  • User283571144 posted

    Hi Selvakumar Ramachandran,

    As far as I know, the default NTLM authentication and Kerberos authentication use the Microsoft Windows NT user credentials associated with the calling application to attempt authentication with the server.

    When using non-default NTLM authentication, the application sets the authentication type to NTLM and uses a NetworkCredential object to pass the user name, password, and domain to the host, as shown in the following example.

    String MyURI = "http://www.contoso.com/";  
    WebRequest WReq = WebRequest.Create (MyURI);  
    WReq.Credentials =   
        new NetworkCredential(UserName, SecurelyStoredPassword, Domain);

    Or

    String MyURI = "http://www.contoso.com/";  
    WebRequest WReq = WebRequest.Create (MyURI);  
    WReq.Credentials = CredentialCache.DefaultCredentials;  

    Best Regards,

    Brando

    Monday, August 13, 2018 6:45 AM