diff --git a/webauthn/src/main/java/org/springframework/security/web/webauthn/management/Webauthn4JRelyingPartyOperations.java b/webauthn/src/main/java/org/springframework/security/web/webauthn/management/Webauthn4JRelyingPartyOperations.java index f9db52cd31..5621ee68e9 100644 --- a/webauthn/src/main/java/org/springframework/security/web/webauthn/management/Webauthn4JRelyingPartyOperations.java +++ b/webauthn/src/main/java/org/springframework/security/web/webauthn/management/Webauthn4JRelyingPartyOperations.java @@ -95,7 +95,7 @@ public class Webauthn4JRelyingPartyOperations implements WebAuthnRelyingPartyOpe private final PublicKeyCredentialRpEntity rp; - private final ObjectConverter objectConverter = new ObjectConverter(); + private ObjectConverter objectConverter = new ObjectConverter(); private final AuthenticationTrustResolver trustResolver = new AuthenticationTrustResolverImpl(); @@ -137,6 +137,15 @@ public class Webauthn4JRelyingPartyOperations implements WebAuthnRelyingPartyOpe this.webAuthnManager = webAuthnManager; } + /** + * Sets the {@link ObjectConverter} to use. + * @param objectConverter the {@link ObjectConverter} to use. Cannot be null. + */ + void setObjectConverter(ObjectConverter objectConverter) { + Assert.notNull(objectConverter, "objectConverter cannot be null"); + this.objectConverter = objectConverter; + } + /** * Sets a {@link Consumer} used to customize the * {@link PublicKeyCredentialCreationOptionsBuilder} for