Since some time it seems the NtlmAuthenticator
of RestSharp
is deprecated. The somewhere mentioned method of setting setting.UseDefaultCredentials = true;
isn't available either.
So how can I use NTLM
or Kerberos
with RestSharp
?
AND NO! I cannot say the other program, that I want to use LDAP
or OAuth2.0
or whatever you think is appropriate. I have a program that says: "I have an API and you can authorize by LDAP/Kerberos
and then you get data!" and I am not the programmer of that API.
Has anyone an idea of how to get my data with the newer versions of RestSharp or do I have to go back to old versions?
Both Credentials
and UseDefaultCredentials
are available, unlike you said, in RestClientOptions
:
/// <summary>
/// In general you would not need to set this directly. Used by the NtlmAuthenticator.
/// </summary>
public ICredentials? Credentials { get; set; }
/// <summary>
/// Determine whether or not the "default credentials" (e.g. the user account under which the current process is
/// running) will be sent along to the server. The default is false.
/// </summary>
public bool UseDefaultCredentials { get; set; }