default String compact(final Ticket ticket) throws Exception {
        val creationTime = ticket.getCreationTime().toEpochSecond();
        val expirationTime = ticket.getExpirationPolicy().toMaximumExpirationTime(ticket).toEpochSecond();
        val builder = new StringBuilder(String.format("%s%s%s", creationTime, DELIMITER, expirationTime));
        return compact(builder, ticket);
    }
Compact ticket.

@param ticket the ticket
@return the string
@throws Exception the exception
api/cas-server-core-api-ticket/src/main/java/org/apereo/cas/ticket/registry/TicketCompactor.java