@Override
    public Stream<? extends Ticket> getSessionsFor(final String principalId) {
        val ticketDefinitions = ticketCatalog.findTicketImplementations(TicketGrantingTicket.class);
        return ticketDefinitions
            .stream()
            .flatMap(definition -> FunctionUtils.doUnchecked(() -> {
                val collection = getTicketCollectionInstanceByMetadata(definition);
                val spliterator = firestore.collection(collection).whereEqualTo("principal",
                    digestIdentifier(principalId)).get().get().spliterator();
                return StreamSupport.stream(spliterator, false);
            }))
            .map(document -> document.toObject(GoogleCloudFirestoreTicketDocument.class))
            .map(document -> deserializeTicket(document.getJson(), document.getType()))
            .map(this::decodeTicket)
            .filter(ticket -> !ticket.isExpired());
    }
This is {@link GoogleCloudFirestoreTicketRegistry}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-gcp-firestore-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/GoogleCloudFirestoreTicketRegistry.java