Skip to content

feat: add HTTP/HTTPS authentication and SSL validation support #12

Description

@JusterZhu

Summary

Adds HTTP/HTTPS compatibility features (SSL validation, proxy, timeouts, retry) and multiple authentication methods (Bearer, Basic, ApiKey, HMAC) to GeneralUpdate.Maui.Android.

Changes

New files (6)

  • IHttpAuthProvider + ISslValidationPolicy interfaces
  • AuthScheme enum (Hmac/Bearer/ApiKey/Basic)
  • 5 auth providers (NoOp, BearerToken, ApiKey, Basic, Hmac) + HttpAuthProviderFactory
  • StrictSslValidationPolicy / AllowAllSslValidationPolicy
  • HttpDownloadOptions configuration record
  • publish-nuget.yml CI workflow (mirrors GeneralUpdate.Avalonia pattern)

Modified files (4)

  • UpdatePackageInfo.cs — 5 nullable auth fields for per-package authentication (overrides global)
  • HttpRangeDownloader.cs — Auth injection into HTTP GET requests, IDisposable
  • GeneralUpdateBootstrap.cs — Optional HttpDownloadOptions parameter
  • AndroidBootstrap.cs — Disposes downloader if IDisposable

CI workflow

  • SemVer 2.0 validation
  • Android workload installation
  • Build, test, pack
  • Git tag + GitHub Release
  • NuGet.org Trusted Publishing (OIDC)

Design

  • Fully backward-compatible (all new params optional, default behavior identical)
  • Auth priority: per-package > global > none
  • Instance-based (no static global state)
  • No dependency on GeneralUpdate.Core

Verification

  • ✅ Library builds: 0 warnings, 0 errors
  • ✅ All 8 existing unit tests pass
  • ✅ Test project builds: 0 warnings, 0 errors

Closes #14 (feature request for auth support)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions