package io.pivotal.web.config;

import org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerExchangeFilterFunction;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
import org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository;
import org.springframework.security.oauth2.client.web.reactive.function.client.ServletOAuth2AuthorizedClientExchangeFilterFunction;
import org.springframework.web.reactive.function.client.WebClient;

@Configuration
public class BeanConfiguration {

    @Bean
    public WebClient webClient(LoadBalancerExchangeFilterFunction eff,
            ClientRegistrationRepository clientRegistrationRepository,
                               OAuth2AuthorizedClientRepository authorizedClientRepository) {
        ServletOAuth2AuthorizedClientExchangeFilterFunction oauth2 = new ServletOAuth2AuthorizedClientExchangeFilterFunction(
                clientRegistrationRepository, authorizedClientRepository);
        return WebClient.builder()
                .filter(eff)
                .apply(oauth2.oauth2Configuration())
                .build();
    }

}

@@ -707,16 +707,52 @@
 bClient(
+WebClient.Builder webClientBuilder, 
 LoadBala
@@ -1164,25 +1164,25 @@
  return 
-W
+w
 ebClient
 .builder
@@ -1177,18 +1177,15 @@
 ient
-.b
+B
 uilder
-()
 %0A   

Fix definition of web client builder.