public void destroyTicketGrantingTicket(final CasRestProfile profile, final WebContext context) {
        HttpURLConnection connection = null;
        try {
            val endpointURL = new URL(configuration.computeFinalRestUrl(context));
            val deleteURL = new URL(endpointURL, endpointURL.getPath() + "/" + profile.getTicketGrantingTicketId());
            connection = HttpUtils.openDeleteConnection(deleteURL);
            val responseCode = connection.getResponseCode();
            if (responseCode != HttpConstants.OK) {
                throw new TechnicalException("TGT delete request for `" + profile + "` failed: " +
                        HttpUtils.buildHttpErrorMessage(connection));
            }
        } catch (final IOException e) {
            throw new TechnicalException(e);
        } finally {
            HttpUtils.closeConnection(connection);
        }
    }
<p>destroyTicketGrantingTicket.</p>

@param profile a {@link CasRestProfile} object
@param context a {@link WebContext} object
pac4j-cas/src/main/java/org/pac4j/cas/client/rest/AbstractCasRestClient.java