@Override
    public Stream<? extends Ticket> getSessionsWithAttributes(final Map<String, List<Object>> queryAttributes) {
        val metadata = ticketCatalog.findTicketDefinition(TicketGrantingTicket.class).orElseThrow();
        val queryList = new ArrayList<String>();
        queryAttributes.forEach((key, values) ->
            values.forEach(queryValue -> {
                var cql = "SELECT * FROM %s.%s WHERE prefix='%s' AND ".formatted(properties.getKeyspace(), metadata.getProperties().getStorageName(), metadata.getPrefix());
                cql += "attributes CONTAINS KEY '%s' AND attributes CONTAINS '%s' ALLOW FILTERING;".formatted(digestIdentifier(key), digestIdentifier(queryValue.toString()));
                queryList.add(cql);
            }));
        val rowMapper = new BeanPropertyRowMapper<>(CassandraTicketHolder.class, true);
        return queryList
            .stream()
            .flatMap(query -> cassandraSessionFactory.getCqlTemplate().queryForStream(query, rowMapper))
            .distinct()
            .map(holder -> {
                val result = deserializeTicket(holder.getData(), holder.getType());
                return decodeTicket(result);
            })
            .filter(ticket -> !ticket.isExpired());
    }
This is {@link CassandraTicketRegistry}.

@author Misagh Moayyed
@author doomviking
@since 6.1.0
support/cas-server-support-cassandra-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/CassandraTicketRegistry.java