Skip to content

Implement client certificate authentication and page find features - #86

Open
fmazzant wants to merge 11 commits into
mainfrom
release/1.7.0
Open

fmazzant wants to merge 11 commits into
mainfrom
release/1.7.0

Conversation

@fmazzant

@fmazzant fmazzant commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Release branch for milestone 1.7.0.

This release adds client certificate authentication (mTLS) and find-in-page support across Android, iOS, Mac Catalyst, and Windows. It also includes an iOS/Mac Catalyst fix for duplicate navigation events and false failures when LoadUrl headers are removed during a cross-origin redirect.

Highlights

  • Add ClientCertificateRequested for servers that require a client certificate.
  • Add find-in-page APIs: FindAsync, FindNext, FindPrevious, ClearFind, and FindResultsUpdated.
  • Update the sample app with a find bar and a page demonstrating LoadUrl headers.
  • Update the changelog and documentation for version 1.7.0.
  • Configure the Windows CI job to build the sample for its Windows target framework only.

Issues

…ed (#58)

Add the ClientCertificateRequested event for servers that require a client
certificate (mutual TLS). The app answers with an X509Certificate2 with its
private key (plus optional intermediates), or continues without one; a
deferral allows loading it asynchronously. Without a handler the platform
default applies.

- Android: WebViewClient.OnReceivedClientCertRequest; the key is passed to
  ClientCertRequest.Proceed as PKCS#8 (RSA or EC) with the chain.
- iOS / Mac Catalyst: NSURLAuthenticationMethodClientCertificate challenge
  answered with an NSUrlCredential from a SecIdentity.
- Windows: CoreWebView2.ClientCertificateRequested; the certificate is
  matched by thumbprint against the store certificates the server accepts,
  listed in AvailableCertificates.
- Unit tests for issuer names, the store match and the key export; README
  section.
…nd (#27)

Search text in the page, highlight the matches and move between them.
FindAsync returns the match count and scrolls to the first match;
FindResultsUpdated reports the active match (from 0) and the count.

- Android: WebView.FindAllAsync, FindNext and ClearMatches with a
  FindListener (always case-insensitive).
- iOS / Mac Catalyst: WKWebView reports no count, so the search runs in the
  page: DOM ranges of the main frame, highlighted with the CSS Custom
  Highlight API (iOS 17.2+) or shown as the selection, scrolled into view.
- Windows: the WebView2 Find API without its find bar.
- Unit tests for the page script (in Jint on a fake DOM) and the result
  parsing; find bar in the sample app; README section.
…ntication

feat: client certificate authentication (mTLS) (#58)
…ers are removed from a redirect (#83)

When a LoadUrl navigation is redirected to another origin, iOS / Mac
Catalyst cancel the redirected request and load it again without the
headers (#60). The app then saw Navigating twice for the same URL, and
the cancelled request was reported as a failure (Navigated with Failure
and NavigationFailed with Cancelled).

- RequestHeaderState remembers the retry: BeginRetry, TryConsumeRetry
  (once, for the next top-level request) and IsRetryInterruption
  (WebKitErrorDomain 102 or NSURLErrorDomain -999, once, until the next
  commit).
- DecidePolicy: the retry is decided without MAUI, so Navigating is not
  raised again; the leaked-header check still runs, so the guard against
  an endless retry stays.
- DidFailProvisionalNavigation: the interruption of the cancelled request
  is not reported.
- Unit tests for the new state.
The build-windows job fails with NETSDK1147 (ios workload missing) since
the runner image ships .NET SDK 10.0.404: restore evaluates every target
framework of the sample, -f included, and only maui-windows is installed.
Restrict the sample to its Windows target framework in that job.
fix(ios): no second Navigating and no false failure when LoadUrl headers are removed from a redirect (#83)
ci: build the Windows sample for its Windows target framework only
@fmazzant fmazzant self-assigned this Dec 1, 2026
@fmazzant fmazzant added this to the 1.7.0 milestone Dec 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants