private static OAuth20TokenGeneratedResult generateAccessTokenResult(
        final AccessTokenRequestContext tokenRequestContext,
        final AccessAndRefreshTokens accessAndRefreshTokens) {
        return OAuth20TokenGeneratedResult
            .builder()
            .registeredService(tokenRequestContext.getRegisteredService())
            .accessToken(accessAndRefreshTokens.accessToken())
            .refreshToken(accessAndRefreshTokens.refreshToken())
            .grantType(tokenRequestContext.getGrantType())
            .responseType(tokenRequestContext.getResponseType())
            .build();
    }
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