@Override
    public void updateSignatureCount(final AssertionResult result) {
        val username = result.getUsername();
        val registration = getRegistrationByUsernameAndCredentialId(username, result.getCredential().getCredentialId())
            .orElseThrow(() -> new NoSuchElementException(String.format("Credential \"%s\" is not registered to user \"%s\"",
                result.getCredential().getCredentialId(), username)));
        val registrations = getRegistrationsByUsername(username);
        registrations.remove(registration);
        registrations.add(registration.withCredential(registration.getCredential().toBuilder()
            .signatureCount(result.getSignatureCount())
            .build()));
        update(username, new HashSet<>(registrations));
    }
This is {@link BaseWebAuthnCredentialRepository}.

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