public ExpirationPolicy toTicketExpirationPolicy() {
        val timeToKillInSeconds = casProperties.getAuthn().getSamlIdp()
            .getTicket().getAttributeQuery().getTimeToKillInSeconds();
        return timeToKillInSeconds <= 0
            ? new NeverExpiresExpirationPolicy()
            : new HardTimeoutExpirationPolicy(timeToKillInSeconds);
    }
To ticket expiration policy.

@return the expiration policy
support/cas-server-support-saml-idp-ticket/src/main/java/org/apereo/cas/ticket/query/SamlAttributeQueryTicketExpirationPolicyBuilder.java