class OAuth20Configuration extends OAuthConfiguration {

    /** Constant <code>OAUTH_CODE="code"</code> */
    public static final String OAUTH_CODE = "code";

    /** Constant <code>STATE_REQUEST_PARAMETER="state"</code> */
    public static final String STATE_REQUEST_PARAMETER = "state";

    /* Map containing user defined parameters */
    private Map<String, String> customParams = new HashMap<>();

    private boolean withState;

    private ValueGenerator stateGenerator = new RandomValueGenerator();

    /**
     * {@inheritDoc}
     *
     * Build an OAuth service from the web context.
     */
    @Override
    public OAuthService buildService(final WebContext context, final IndirectClient client) {<FILL_FUNCTION_BODY>}

    /**
     * <p>Setter for the field <code>stateGenerator</code>.</p>
     *
     * @param stateGenerator a {@link ValueGenerator} object
     */
    public void setStateGenerator(final ValueGenerator stateGenerator) {
        CommonHelper.assertNotNull("stateGenerator", stateGenerator);
        this.stateGenerator = stateGenerator;
    }
}

        init();

        val finalCallbackUrl = client.computeFinalCallbackUrl(context);

        return ((DefaultApi20) api).createService(this.key, this.secret, finalCallbackUrl, this.scope,
            this.responseType, null, null, this.httpClientConfig, null);
    
<methods>public non-sealed void <init>() ,public abstract com.github.scribejava.core.oauth.OAuthService buildService(org.pac4j.core.context.WebContext, org.pac4j.core.client.IndirectClient) <variables>public static final java.lang.String OAUTH_TOKEN,public static final java.lang.String RESPONSE_TYPE_CODE,protected java.lang.Object api,protected org.pac4j.oauth.config.HasBeenCancelledFactory hasBeenCancelledFactory,protected com.github.scribejava.core.httpclient.HttpClientConfig httpClientConfig,protected java.lang.String key,protected org.pac4j.oauth.profile.definition.OAuthProfileDefinition profileDefinition,protected java.lang.String responseType,protected java.lang.String scope,protected java.lang.String secret,protected boolean tokenAsHeader