webauthn-client-json-core¶
JSON interoperability layer on top of raw-response client orchestration.
What it provides¶
withJsonSupport(...)extension forPasskeyClientWebAuthnJsonCodecintegration point supplied explicitly by the application- JSON-first boundary support while retaining raw, byte-preserving client output
When to use¶
Use this when your host and backend exchange WebAuthn JSON payloads and your app needs the platform response to remain raw until it reaches the backend trust boundary.
How to use¶
import dev.webauthn.client.JsonPasskeyClient
import dev.webauthn.client.PasskeyClient
import dev.webauthn.client.withJsonSupport
import dev.webauthn.serialization.KotlinxWebAuthnJsonCodec
fun jsonClient(passkeyClient: PasskeyClient): JsonPasskeyClient {
return passkeyClient.withJsonSupport(KotlinxWebAuthnJsonCodec())
}
Real-world scenario: an SDK surface accepts and returns JSON strings, but delegates actual ceremony orchestration to the raw client boundary internally.
How it fits¶
flowchart LR
APP["Host app or SDK"] --> JSON["webauthn-client-json-core"]
JSON --> CORE["webauthn-client-core"]
CORE --> PLATFORM["Android or iOS passkey client"]
Pitfalls and limits¶
- JSON convenience does not remove trust-boundary validation needs on the server.
- JSON entry points use a replaceable WebAuthn-specific codec; malformed request JSON still fails as
InvalidOptions. - Keep mapper and model versions aligned to avoid shape drift.
iOS targets¶
- Published Apple targets are
iosArm64andiosSimulatorArm64. iosX64support was removed to align with upstream dependency artifacts and current CI target compatibility.
Status¶
Beta, optional JSON interop layer.