@Override
    public boolean removeRegistrationByUsernameAndCredentialId(final String username, final ByteArray credentialId) {
        val registrations = new HashSet<>(getRegistrationsByUsername(username));
        val removed = registrations.removeIf(registration -> registration.getCredential().getCredentialId().equals(credentialId));
        update(username, registrations);
        return removed;
    }
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