Skip to content

3.0.0

Latest

Choose a tag to compare

@bernardbr bernardbr released this 07 Apr 14:09

Breaking Changes

  • RestSharp upgraded to 114.0.0 (previously 112.1.0) — the Authenticate method now accepts a CancellationToken as
    the third parameter, following RestSharp 114's updated IAuthenticator interface;
  • Microsoft.Extensions.Logging.Abstractions upgraded to 8.0.3 (previously 3.1.32);
  • Dropped net6.0 test target (EOL);

New Features

  • CancellationToken support — threaded through the entire digest authentication pipeline, from Authenticate down to
    the internal handshake via ExecuteAsync;
  • RFC 2069 support — servers that omit qop in the challenge are now handled correctly, generating the response
    as MD5(HA1:nonce:HA2);
  • Original request parameter forwarding — non-header parameters (body, query string, etc.) from the original request are
    copied to the handshake request, enabling digest authentication with body (auth-int scenarios);
  • New UnexpectedStatusCodeException — replaces the generic throw new Exception() when the server returns an
    unexpected (non-401) status code during the handshake;

Backward Compatibility

  • DigestAuthenticatorLegacy (new static class) — provides [Obsolete]-marked extension methods and factory methods to
    ease migration from v2.x:
    • AuthenticateAsync(client, request) — call without CancellationToken;
    • Create(username, password, logger, timeout) — v1.x parameter order;
    • Create(username, password) — minimal v1.0–v1.4 signature;

Improvements

  • Regex timeout — DigestHeader now uses TimeSpan.FromMilliseconds(500) on the Regex to prevent ReDoS;
  • Relaxed qop validation — qop is no longer required in the digest header (needed for RFC 2069 compliance);
  • AssemblyMarker — new class to obtain the assembly version cleanly, replacing reflection
    via Assembly.GetAssembly();
  • Husky hooks — added commit-msg, pre-commit, and pre-push hooks for quality control;

Tests

  • New unit tests for DigestAuthenticator, DigestHeader, DigestAuthenticatorManager,
    DigestAuthenticatorLegacy, and UnexpectedStatusCodeException;
  • New integration tests for error scenarios, wrong credentials, multiple HTTP methods, concurrent requests, RFC 2069,
    and digest with required body;
  • Test project split into separate Unit Tests and Integration Tests projects;

CI/CD

  • Release branch support added to the NuGet publish workflow;
  • CodeQL workflow updated;