@Override
    public Ticket expand(final String ticketId) throws Throwable {
        val structure = parse(ticketId);
        val service = serviceFactory.createService(structure.ticketElements().get(CompactTicketIndexes.SERVICE.getIndex()));
        val authentication = expandAuthentication(principalFactory, structure);
        val serviceTicketFactory = (ServiceTicketFactory) ticketFactory.getObject().get(ServiceTicket.class);
        val serviceTicket = serviceTicketFactory.create(service, authentication, false, ServiceTicket.class);

        val proxyTicketFactory = (ProxyTicketFactory) ticketFactory.getObject().get(getTicketType());
        val proxyGrantingTicketFactory = (ProxyGrantingTicketFactory) ticketFactory.getObject().get(ProxyGrantingTicket.class);
        val proxyGrantingTicket = proxyGrantingTicketFactory.create(serviceTicket, authentication);

        val proxyTicket = proxyTicketFactory.create(proxyGrantingTicket, service);
        proxyTicket.setExpirationPolicy(new FixedInstantExpirationPolicy(structure.expirationTime()));
        proxyTicket.setCreationTime(DateTimeUtils.zonedDateTimeOf(structure.creationTime()));
        return proxyTicket;
    }
This is {@link ProxyTicketCompactor}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-stateless-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/compact/ProxyTicketCompactor.java