protected void removeTicketGrantingTicket(final String ticketGrantingTicketId) throws Throwable {
        val ticket = (TicketGrantingTicket) ticketRegistrySupport.getTicket(ticketGrantingTicketId);

        if (ticket == null) {
            LOGGER.trace("Existing ticket-granting ticket [{}] not found or expired", ticketGrantingTicketId);
            return;
        }

        LOGGER.trace("Removing existing ticket-granting ticket [{}]", ticketGrantingTicketId);
        val clientInfo = ClientInfoHolder.getClientInfo();
        applicationContext.publishEvent(new CasRequestSingleLogoutEvent(this, ticket, clientInfo));

        ticketRegistrySupport.getTicketRegistry().deleteTicket(ticketGrantingTicketId);
        applicationContext.publishEvent(new CasTicketGrantingTicketDestroyedEvent(this, ticket, clientInfo));
    }
This is {@link DefaultSingleSignOnBuildingStrategy}.

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