RestSharp.Authenticators.Digest 1.5.0
RestSharp.DigestAuthenticator
Extends RestSharp features for digest authentication
Examples
namespace Example
{
using RestSharp;
using RestSharp.Authenticators.Digest;
using System;
public class Program
{
public static void Main(string[] args)
{
var restOptions = new RestClientOptions("https://api.myhost.com/api/v1")
{
Authenticator = new DigestAuthenticator(USERNAME, PASSWORD)
};
var client = new RestClient(restOptions);
var request = new RestRequest("values", Method.GET);
request.AddHeader("Content-Type", "application/json");
var response = client.Execute(request);
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.Content);
Console.ReadKey(true);
}
}
}
No packages depend on RestSharp.Authenticators.Digest.
Release notes
v1.4.0
- Fixies the authentication when the qop value comes without
"; - Updates packages;
- Adds a real integration tests;
v1.5.0
- Adjusts the nuget package;
- Adds optional ILogger to the DigestAuthenticator constructor;
- Adds optional request timeout to the DigestAuthenticator constructor;
.NET Standard 2.0
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.32)
- RestSharp (>= 110.2.0)