public ExpirationPolicy toTicketExpirationPolicy() {
        val oauth = casProperties.getAuthn().getOauth();
        return new OAuth20CodeExpirationPolicy(oauth.getCode().getNumberOfUses(),
            oauth.getCode().getTimeToKillInSeconds());
    }
To ticket expiration policy.

@return the expiration policy
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/ticket/code/OAuth20CodeExpirationPolicyBuilder.java