@Override
    protected void update(final String username, final Collection<CredentialRegistration> givenRecords) {
        val storage = readFromJsonRepository();
        val records = givenRecords.stream()
            .map(record -> {
                if (record.getRegistrationTime() == null) {
                    return record.withRegistrationTime(Instant.now(Clock.systemUTC()));
                }
                return record;
            }).toList();
        storage.put(username.trim().toLowerCase(Locale.ENGLISH), new LinkedHashSet<>(records));
        FunctionUtils.doUnchecked(__ -> WebAuthnUtils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValue(location.getFile(), storage));
    }
This is {@link JsonResourceWebAuthnCredentialRepository}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-webauthn-core/src/main/java/org/apereo/cas/webauthn/storage/JsonResourceWebAuthnCredentialRepository.java