private void populateWebflowWithTicketFromCookie(final RequestContext requestContext, final String ticketId) {
        LOGGER.debug("Attempting to locate ticket-granting ticket from cookie value [{}]", ticketId);
        val ticket = FunctionUtils.doAndHandle(() -> ticketRegistry.getTicket(ticketId, TicketGrantingTicket.class), throwable -> null).get();
        if (ticket != null) {
            LOGGER.debug("Found ticket-granting ticket [{}]", ticket.getId());
            WebUtils.putTicketGrantingTicket(requestContext, ticket);
            WebUtils.putTicketGrantingTicketInScopes(requestContext, ticket);
            WebUtils.putAuthentication(ticket.getAuthentication(), requestContext);
        }
    }
This is {@link FetchTicketGrantingTicketAction}.

@author Misagh Moayyed
@since 6.6.0
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/actions/FetchTicketGrantingTicketAction.java