protected Long getTimeToLive(final ExpirationPolicyBuilder expirationPolicy,
                                 final RegisteredService registeredService) {
        val timeToLive = expirationPolicy.buildTicketExpirationPolicyFor(registeredService).getTimeToLive();
        return Long.MAX_VALUE == timeToLive ? Long.valueOf(Integer.MAX_VALUE) : timeToLive;
    }
This is {@link JwtTicketBuilder}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-token-core-api/src/main/java/org/apereo/cas/token/JwtTicketBuilder.java