@CanIgnoreReturnValue
    public DefaultTicketFactory addTicketFactory(final @NonNull Class<? extends Ticket> ticketClass,
                                                 final @NonNull TicketFactory factory) {
        this.factoryMap.put(ticketClass.getCanonicalName(), factory);
        return this;
    }
Add ticket factory.

@param ticketClass the ticket class
@param factory     the factory
@return the default ticket factory
core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/factory/DefaultTicketFactory.java