public ExpirationPolicy toTicketExpirationPolicy() {
        val oauth = casProperties.getAuthn().getOauth().getDeviceToken();
        return new OAuth20DeviceTokenExpirationPolicy(Beans.newDuration(oauth.getMaxTimeToLiveInSeconds()).toSeconds());
    }
To ticket expiration policy.

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