Test Jackson 3 deserializer with unknown primitive WebAuthn ext

Signed-off-by: Ziqin Wang <ziqin@wangziqin.net>
This commit is contained in:
Ziqin Wang 2026-03-15 12:30:57 +08:00
parent 7f75fd611e
commit 65bf54d842
No known key found for this signature in database
GPG Key ID: B4A9D243A3DD5D9B

View File

@ -121,6 +121,23 @@ class JacksonTests {
assertThat(outputs).usingRecursiveComparison().isEqualTo(credProps);
}
@Test
void readAuthenticationExtensionsClientOutputsWhenAppId() {
String json = """
{
"appid": false,
"credProps": {
"rk": false
}
}
""";
CredentialPropertiesOutput credProps = new CredentialPropertiesOutput(false);
AuthenticationExtensionsClientOutputs outputs = this.mapper.readValue(json,
AuthenticationExtensionsClientOutputs.class);
assertThat(outputs.getOutputs()).usingRecursiveFieldByFieldElementComparator().contains(credProps);
}
@Test
void readAuthenticationExtensionsClientOutputsWhenUnknownExtension() {
String json = """