private static String getResponse(final Ticket ticketGrantingTicket,
                                      final HttpServletRequest request,
                                      final URI ticketReference,
                                      final HttpHeaders headers) {
        if (isDefaultContentType(request)) {
            headers.setContentType(MediaType.TEXT_HTML);
            val tgtUrl = ticketReference.toString();
            return DOCTYPE_AND_OPENING_FORM
                   + tgtUrl
                   + REST_OF_THE_FORM_AND_CLOSING_TAGS;
        }
        return ticketGrantingTicket.getId();
    }
This is {@link DefaultTicketGrantingTicketResourceEntityResponseFactory}.

@author Misagh Moayyed
@since 5.2.0
core/cas-server-core-rest-api/src/main/java/org/apereo/cas/rest/factory/DefaultTicketGrantingTicketResourceEntityResponseFactory.java