protected boolean isRequestAskingForServiceTicket(final RequestContext context) throws Throwable {
        val ticketGrantingTicketId = WebUtils.getTicketGrantingTicketId(context);
        LOGGER.trace("Located ticket-granting ticket [{}] from the request context", ticketGrantingTicketId);

        val service = WebUtils.getService(context);
        LOGGER.trace("Located service [{}] from the request context", service);

        if (service != null && StringUtils.isNotBlank(ticketGrantingTicketId)) {
            val authn = getConfigurationContext().getTicketRegistrySupport().getAuthenticationFrom(ticketGrantingTicketId);
            LOGGER.debug("Request identifies itself as one asking for service tickets. Checking for authentication context validity...");
            val validAuthn = validateExistingAuthentication(authn, context);
            if (validAuthn) {
                LOGGER.debug("Existing authentication context linked to ticket-granting ticket [{}] is valid. "
                    + "CAS will try to issue service tickets for [{}] once credentials are renewed", ticketGrantingTicketId, service);
                return true;
            }
            LOGGER.debug("Existing authentication context linked to ticket-granting ticket [{}] is NOT valid. "
                    + "CAS will not issue service tickets for [{}] just yet without renewing the authentication context",
                ticketGrantingTicketId, service);
            return false;
        }

        LOGGER.debug("Request is not eligible to be issued service tickets just yet");
        return false;
    }
This is {@link ServiceTicketRequestWebflowEventResolver}
that creates the next event responding to requests that are service-ticket requests.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/resolver/impl/ServiceTicketRequestWebflowEventResolver.java