use of com.webauthn4j.converter.util.JsonConverter in project webauthn4j by webauthn4j.
the class AuthenticationExtensionsClientInputsDeserializerTest method deserialize_test_with_authentication_extension_JSON_data.
@Test
void deserialize_test_with_authentication_extension_JSON_data() {
ObjectConverter objectConverter = new ObjectConverter();
JsonConverter jsonConverter = objectConverter.getJsonConverter();
AuthenticationExtensionsClientInputs<AuthenticationExtensionClientInput> extensionInputs = jsonConverter.readValue("{ " + "\"appid\": \"dummy\" " + "}", new TypeReference<AuthenticationExtensionsClientInputs<AuthenticationExtensionClientInput>>() {
});
assertAll(() -> assertThat(extensionInputs.getExtension(FIDOAppIDExtensionClientInput.class).getValue()).isEqualTo("dummy"));
}
use of com.webauthn4j.converter.util.JsonConverter in project webauthn4j by webauthn4j.
the class AuthenticationExtensionsClientInputsDeserializerTest method deserialize_test_with_registration_extension_JSON_data.
@Test
void deserialize_test_with_registration_extension_JSON_data() {
ObjectConverter objectConverter = new ObjectConverter();
JsonConverter jsonConverter = objectConverter.getJsonConverter();
AuthenticationExtensionsClientInputs<RegistrationExtensionClientInput> extensionInputs = jsonConverter.readValue("{ " + "\"credProps\": true " + "}", new TypeReference<AuthenticationExtensionsClientInputs<RegistrationExtensionClientInput>>() {
});
assertAll(() -> assertThat(extensionInputs.getExtension(CredentialPropertiesExtensionClientInput.class).getValue()).isTrue());
}
Aggregations