protected void updateTicketGrantingTicket(final Ticket ticketGrantingTicket) throws Exception {
        if (ticketGrantingTicket != null && !ticketGrantingTicket.isExpired()) {
            LOGGER.debug("Updating parent ticket-granting ticket [{}]", ticketGrantingTicket);
            ticketGrantingTicket.update();
            ticketRegistry.updateTicket(ticketGrantingTicket);
        }
    }
This is {@link OAuth20DefaultTokenGenerator}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/OAuth20DefaultTokenGenerator.java