private void updateRefreshToken(final AccessTokenRequestContext tokenRequestContext,
                                    final Ticket accessToken) throws Exception {
        if (tokenRequestContext.isRefreshToken() && !tokenRequestContext.getToken().isStateless()) {
            val refreshToken = (OAuth20RefreshToken) tokenRequestContext.getToken();
            LOGGER.trace("Tracking access token [{}] linked to refresh token [{}]", accessToken.getId(), refreshToken.getId());
            refreshToken.getAccessTokens().add(accessToken.getId());
            ticketRegistry.updateTicket(refreshToken);
        }
    }
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