public ExpirationPolicy toTicketExpirationPolicy() {
        val oauth = casProperties.getAuthn().getOauth().getAccessToken();
        if (casProperties.getTicket().isTrackDescendantTickets()) {
            return new OAuth20AccessTokenExpirationPolicy(
                Beans.newDuration(oauth.getMaxTimeToLiveInSeconds()).toSeconds(),
                Beans.newDuration(oauth.getTimeToKillInSeconds()).toSeconds()
            );
        }
        return new OAuth20AccessTokenExpirationPolicy.OAuthAccessTokenSovereignExpirationPolicy(
            Beans.newDuration(oauth.getMaxTimeToLiveInSeconds()).toSeconds(),
            Beans.newDuration(oauth.getTimeToKillInSeconds()).toSeconds()
        );
    }
To ticket expiration policy.

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