protected Ticket addTicketToRegistry(final Ticket ticket, final Ticket ticketGrantingTicket) throws Exception {
        LOGGER.debug("Adding ticket [{}] to registry", ticket);
        val addedToken = ticketRegistry.addTicket(ticket);
        updateTicketGrantingTicket(ticketGrantingTicket);
        return addedToken;
    }
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