@Override
    public OAuth20TokenGeneratedResult generate(final AccessTokenRequestContext tokenRequestContext) throws Throwable {
        if (OAuth20ResponseTypes.DEVICE_CODE == tokenRequestContext.getResponseType()) {
            return generateAccessTokenOAuthDeviceCodeResponseType(tokenRequestContext);
        }
        val accessAndRefreshTokens = generateAccessTokenOAuthGrantTypes(tokenRequestContext);
        return generateAccessTokenResult(tokenRequestContext, accessAndRefreshTokens);
    }
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