@Override
    public Collection<CredentialRegistration> getRegistrationsByUsername(final String username) {
        return transactionTemplate.execute(status -> {
            val records = entityManager.createQuery(
                    SELECT_QUERY.concat("WHERE r.username = :username"), JpaWebAuthnCredentialRegistration.class)
                .setParameter("username", username.trim().toLowerCase(Locale.ENGLISH))
                .getResultList();

            return records.stream()
                .map(record -> getCipherExecutor().decode(record.getRecords()))
                .map(Unchecked.function(record -> WebAuthnUtils.getObjectMapper().readValue(record, new TypeReference<Set<CredentialRegistration>>() {
                })))
                .flatMap(Collection::stream)
                .collect(Collectors.toList());
        });
    }
This is {@link JpaWebAuthnCredentialRepository}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-webauthn-jpa/src/main/java/org/apereo/cas/webauthn/JpaWebAuthnCredentialRepository.java