Add passkey registration support for WebView, Fixes AB#3385532
AB#3385532 https://identitydivision.visualstudio.com/DevEx/_git/AuthLibrariesApiReview/pullrequest/20357
This PR implements passkey registration support for MSAL/Broker/OneAuth on Android WebView through a WebMessageListener bridge. It extends the existing authentication-only passkey functionality to include full registration capabilities, leveraging the standard Android Credential Manager.
🎯 Key Features Protocol Version Update
- Current: x-ms-PassKeyAuth: 1.0/passkey (authentication only)
- New: x-ms-PassKeyAuth: 1.1/passkey (registration + authentication)
Passkey and Credential Manager Integration:
- Added new
CredentialManagerHandlerclass to encapsulate passkey creation and retrieval using the Android Credential Manager API, including version checks and logging. This simplifies and centralizes interactions with the credential APIs. - Introduced
PasskeyReplyChannelclass to standardize communication of WebAuthn responses (success and error) back to JavaScript viaJavaScriptReplyProxy, with detailed error mapping to DOMException types per the WebAuthn specification.
Protocol Version Handling:
- Updated protocol version validation in
FidoChallengeFieldto accept both1.0and1.1as supported passkey protocol versions, improving compatibility with newer protocol versions.
Dependency Management:
- Added
androidx.webkit:webkitas a dependency to support enhanced WebView and JavaScript interaction features.
Telemetry will be added in following PR
✅ Work item link check complete. Description contains link AB#3385532 to an Azure Boards work item.
Assemble consumers will fail because webkit version is not defined in those libraries yet.