Search in sources :

Example 1 with DbsWebClientConfigurationProperties

use of com.backbase.stream.webclient.configuration.DbsWebClientConfigurationProperties in project stream-services by Backbase.

the class DbsWebClientConfigurationTest method testWebClient.

@Test
public void testWebClient() {
    String tokenUri = "http://localhost:" + PORT + "/api/token-converter/oauth/token";
    ClientRegistration clientRegistration = ClientRegistration.withRegistrationId("dbs").clientAuthenticationMethod(ClientAuthenticationMethod.POST).clientId("bb-client").clientSecret("bb-secret").authorizationGrantType(AuthorizationGrantType.CLIENT_CREDENTIALS).tokenUri(tokenUri).build();
    DbsWebClientConfiguration dbsWebClientConfiguration = new DbsWebClientConfiguration();
    DateFormat dateFormat = dbsWebClientConfiguration.dateFormat();
    ObjectMapper objectMapper = dbsWebClientConfiguration.objectMapper(dateFormat);
    List<ClientRegistration> registrations = Collections.singletonList(clientRegistration);
    InMemoryReactiveClientRegistrationRepository registrationRepository = new InMemoryReactiveClientRegistrationRepository(registrations);
    InMemoryReactiveOAuth2AuthorizedClientService clientService = new InMemoryReactiveOAuth2AuthorizedClientService(registrationRepository);
    AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager oAuth2AuthorizedClientManager = new AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager(registrationRepository, clientService);
    ClientCredentialsReactiveOAuth2AuthorizedClientProvider clientProvider = new ClientCredentialsReactiveOAuth2AuthorizedClientProvider();
    oAuth2AuthorizedClientManager.setAuthorizedClientProvider(clientProvider);
    WebClient.Builder builder = WebClient.builder();
    WebClient webClient = dbsWebClientConfiguration.dbsWebClient(objectMapper, oAuth2AuthorizedClientManager, builder, new DbsWebClientConfigurationProperties());
    Assertions.assertNotNull(webClient);
    String testUrl = "http://localhost:" + PORT + "/hello-world";
    Mono<ClientResponse> exchange = webClient.get().uri(testUrl).exchange().doOnNext(clientResponse -> {
        log.info("Client Response Status: " + clientResponse.rawStatusCode());
    }).onErrorResume(HttpClientErrorException.class, error -> {
        log.error("Client Error Response: " + error.getResponseBodyAsString());
        return Mono.error(error);
    });
    StepVerifier.create(exchange).expectNextCount(1).verifyComplete();
}
Also used : ClientResponse(org.springframework.web.reactive.function.client.ClientResponse) StepVerifier(reactor.test.StepVerifier) DbsWebClientConfigurationProperties(com.backbase.stream.webclient.configuration.DbsWebClientConfigurationProperties) LocalDateTime(java.time.LocalDateTime) WebClient(org.springframework.web.reactive.function.client.WebClient) Disabled(org.junit.jupiter.api.Disabled) ClientCredentialsReactiveOAuth2AuthorizedClientProvider(org.springframework.security.oauth2.client.ClientCredentialsReactiveOAuth2AuthorizedClientProvider) ClientAuthenticationMethod(org.springframework.security.oauth2.core.ClientAuthenticationMethod) ZoneOffset(java.time.ZoneOffset) DateFormat(java.text.DateFormat) ClientResponse(org.springframework.web.reactive.function.client.ClientResponse) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager(org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager) Mono(reactor.core.publisher.Mono) ClientRegistration(org.springframework.security.oauth2.client.registration.ClientRegistration) Test(org.junit.jupiter.api.Test) InMemoryReactiveClientRegistrationRepository(org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository) HttpClientErrorException(org.springframework.web.client.HttpClientErrorException) Slf4j(lombok.extern.slf4j.Slf4j) List(java.util.List) OffsetDateTime(java.time.OffsetDateTime) Assertions(org.junit.jupiter.api.Assertions) StdDateFormat(com.fasterxml.jackson.databind.util.StdDateFormat) InMemoryReactiveOAuth2AuthorizedClientService(org.springframework.security.oauth2.client.InMemoryReactiveOAuth2AuthorizedClientService) Collections(java.util.Collections) AuthorizationGrantType(org.springframework.security.oauth2.core.AuthorizationGrantType) ClientCredentialsReactiveOAuth2AuthorizedClientProvider(org.springframework.security.oauth2.client.ClientCredentialsReactiveOAuth2AuthorizedClientProvider) InMemoryReactiveClientRegistrationRepository(org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository) WebClient(org.springframework.web.reactive.function.client.WebClient) ClientRegistration(org.springframework.security.oauth2.client.registration.ClientRegistration) InMemoryReactiveOAuth2AuthorizedClientService(org.springframework.security.oauth2.client.InMemoryReactiveOAuth2AuthorizedClientService) AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager(org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager) DbsWebClientConfigurationProperties(com.backbase.stream.webclient.configuration.DbsWebClientConfigurationProperties) DateFormat(java.text.DateFormat) StdDateFormat(com.fasterxml.jackson.databind.util.StdDateFormat) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Test(org.junit.jupiter.api.Test)

Example 2 with DbsWebClientConfigurationProperties

use of com.backbase.stream.webclient.configuration.DbsWebClientConfigurationProperties in project stream-services by Backbase.

the class AbstractServiceIntegrationTests method setupWebClientBuilder.

/**
 * Setup Web Client Builder to allow integration tests without Spring.
 */
protected WebClient setupWebClientBuilder(String tokenUri, String clientId, String clientSecret) {
    Hooks.onOperatorDebug();
    DateFormat dateFormat = dbsWebClientConfiguration.dateFormat();
    ObjectMapper objectMapper = dbsWebClientConfiguration.objectMapper(dateFormat);
    ClientRegistration clientRegistration = ClientRegistration.withRegistrationId("dbs").clientAuthenticationMethod(ClientAuthenticationMethod.POST).clientId(clientId).clientSecret(clientSecret).authorizationGrantType(AuthorizationGrantType.CLIENT_CREDENTIALS).tokenUri(tokenUri).build();
    WebClient.Builder builder = WebClient.builder();
    List<ClientRegistration> registrations = Collections.singletonList(clientRegistration);
    InMemoryReactiveClientRegistrationRepository registrationRepository = new InMemoryReactiveClientRegistrationRepository(registrations);
    InMemoryReactiveOAuth2AuthorizedClientService clientService = new InMemoryReactiveOAuth2AuthorizedClientService(registrationRepository);
    AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager oAuth2AuthorizedClientManager = new AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager(registrationRepository, clientService);
    oAuth2AuthorizedClientManager.setAuthorizedClientProvider(new ClientCredentialsReactiveOAuth2AuthorizedClientProvider());
    return dbsWebClientConfiguration.dbsWebClient(objectMapper, oAuth2AuthorizedClientManager, builder, new DbsWebClientConfigurationProperties());
}
Also used : ClientCredentialsReactiveOAuth2AuthorizedClientProvider(org.springframework.security.oauth2.client.ClientCredentialsReactiveOAuth2AuthorizedClientProvider) ClientRegistration(org.springframework.security.oauth2.client.registration.ClientRegistration) InMemoryReactiveOAuth2AuthorizedClientService(org.springframework.security.oauth2.client.InMemoryReactiveOAuth2AuthorizedClientService) AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager(org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager) DbsWebClientConfigurationProperties(com.backbase.stream.webclient.configuration.DbsWebClientConfigurationProperties) DateFormat(java.text.DateFormat) InMemoryReactiveClientRegistrationRepository(org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository) WebClient(org.springframework.web.reactive.function.client.WebClient) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Example 3 with DbsWebClientConfigurationProperties

use of com.backbase.stream.webclient.configuration.DbsWebClientConfigurationProperties in project stream-services-2.0 by Backbase.

the class AbstractServiceIntegrationTests method setupWebClientBuilder.

/**
 * Setup Web Client Builder to allow integration tests without Spring.
 */
protected WebClient setupWebClientBuilder(String tokenUri, String clientId, String clientSecret) {
    Hooks.onOperatorDebug();
    DateFormat dateFormat = dbsWebClientConfiguration.dateFormat();
    ObjectMapper objectMapper = dbsWebClientConfiguration.objectMapper(dateFormat);
    ClientRegistration clientRegistration = ClientRegistration.withRegistrationId("dbs").clientAuthenticationMethod(ClientAuthenticationMethod.POST).clientId(clientId).clientSecret(clientSecret).authorizationGrantType(AuthorizationGrantType.CLIENT_CREDENTIALS).tokenUri(tokenUri).build();
    WebClient.Builder builder = WebClient.builder();
    List<ClientRegistration> registrations = Collections.singletonList(clientRegistration);
    InMemoryReactiveClientRegistrationRepository registrationRepository = new InMemoryReactiveClientRegistrationRepository(registrations);
    InMemoryReactiveOAuth2AuthorizedClientService clientService = new InMemoryReactiveOAuth2AuthorizedClientService(registrationRepository);
    AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager oAuth2AuthorizedClientManager = new AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager(registrationRepository, clientService);
    oAuth2AuthorizedClientManager.setAuthorizedClientProvider(new ClientCredentialsReactiveOAuth2AuthorizedClientProvider());
    return dbsWebClientConfiguration.dbsWebClient(objectMapper, oAuth2AuthorizedClientManager, builder, new DbsWebClientConfigurationProperties());
}
Also used : ClientCredentialsReactiveOAuth2AuthorizedClientProvider(org.springframework.security.oauth2.client.ClientCredentialsReactiveOAuth2AuthorizedClientProvider) ClientRegistration(org.springframework.security.oauth2.client.registration.ClientRegistration) InMemoryReactiveOAuth2AuthorizedClientService(org.springframework.security.oauth2.client.InMemoryReactiveOAuth2AuthorizedClientService) AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager(org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager) DbsWebClientConfigurationProperties(com.backbase.stream.webclient.configuration.DbsWebClientConfigurationProperties) DateFormat(java.text.DateFormat) InMemoryReactiveClientRegistrationRepository(org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository) WebClient(org.springframework.web.reactive.function.client.WebClient) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Example 4 with DbsWebClientConfigurationProperties

use of com.backbase.stream.webclient.configuration.DbsWebClientConfigurationProperties in project stream-services-2.0 by Backbase.

the class DbsWebClientConfiguration method dbsWebClient.

/**
 * Default Reactive Web Client to be used when interacting with DBS Services. Requires OAuth2 client credentials set
 * in application.yml
 *
 * @param objectMapper                          The Jackson Object mapper to register serialization and deserialization json
 *                                              content.
 * @param reactiveOAuth2AuthorizedClientManager Client Manager managing OAuth2 tokens
 * @param builder                               THe Web Client Builder which is already preconfigured using MicroMeter
 *                                              instrumentation.
 * @return Preconfigured Web Client
 */
@Bean
public WebClient dbsWebClient(ObjectMapper objectMapper, ReactiveOAuth2AuthorizedClientManager reactiveOAuth2AuthorizedClientManager, WebClient.Builder builder, DbsWebClientConfigurationProperties dbsWebClientConfigurationProperties) {
    ServerOAuth2AuthorizedClientExchangeFilterFunction oauth2ClientFilter = new ServerOAuth2AuthorizedClientExchangeFilterFunction(reactiveOAuth2AuthorizedClientManager);
    oauth2ClientFilter.setDefaultClientRegistrationId(dbsWebClientConfigurationProperties.getDefaultClientRegistrationId());
    builder.defaultHeader("Content-Type", MediaType.APPLICATION_JSON.toString()).defaultHeader("Accept", MediaType.APPLICATION_JSON.toString()).filter((clientRequest, exchangeFunction) -> {
        final ClientRequest newRequest = Optional.ofNullable(dbsWebClientConfigurationProperties.getAdditionalHeaders()).map(additionalHeaders -> {
            log.debug("Adding additional headers: {} from configuration  Request: {}", additionalHeaders, clientRequest.url());
            return ClientRequest.from(clientRequest).headers(httpHeaders -> httpHeaders.addAll(additionalHeaders)).build();
        }).orElse(clientRequest);
        return Mono.subscriberContext().flatMap(context -> {
            Optional<MultiValueMap<String, String>> forwardHeaders = context.<MultiValueMap<String, String>>getOrEmpty(CONTEXT_KEY_FORWARDED_HEADERS);
            log.debug("context contains headers? " + forwardHeaders.isPresent());
            log.debug("forward headers:" + forwardHeaders.map(MultiValueMap::toString).orElse("null"));
            ClientRequest contextRequest = context.<MultiValueMap<String, String>>getOrEmpty("headers").map(headers -> {
                log.debug("Adding additional headers: {} from Reactive subscriber context to Request: {}", headers, clientRequest.url());
                return ClientRequest.from(newRequest).headers(httpHeaders -> httpHeaders.addAll(headers)).build();
            }).orElse(newRequest);
            return exchangeFunction.exchange(contextRequest);
        });
    }).filter(new CsrfClientExchangeFilterFunction()).filter(oauth2ClientFilter);
    if (log.isDebugEnabled()) {
        HttpClient httpClient = HttpClient.create().wiretap("reactor.netty.http.client.HttpClient", LogLevel.DEBUG, AdvancedByteBufFormat.TEXTUAL);
        builder.clientConnector(new ReactorClientHttpConnector(httpClient));
    }
    // ensure correct exchange strategy is installed
    ExchangeStrategies strategies = ExchangeStrategies.builder().codecs(clientDefaultCodecsConfigurer -> {
        Jackson2JsonEncoder encoder = new Jackson2JsonEncoder(objectMapper, MediaType.APPLICATION_JSON);
        Jackson2JsonDecoder decoder = new Jackson2JsonDecoder(objectMapper, MediaType.APPLICATION_JSON);
        clientDefaultCodecsConfigurer.defaultCodecs().jackson2JsonEncoder(encoder);
        clientDefaultCodecsConfigurer.defaultCodecs().jackson2JsonDecoder(decoder);
    }).build();
    builder.exchangeStrategies(strategies);
    return builder.build();
}
Also used : java.util(java.util) DbsWebClientConfigurationProperties(com.backbase.stream.webclient.configuration.DbsWebClientConfigurationProperties) Jackson2JsonEncoder(org.springframework.http.codec.json.Jackson2JsonEncoder) DeserializationFeature(com.fasterxml.jackson.databind.DeserializationFeature) ServerOAuth2AuthorizedClientExchangeFilterFunction(org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction) JavaTimeModule(com.fasterxml.jackson.datatype.jsr310.JavaTimeModule) org.springframework.web.reactive.function.client(org.springframework.web.reactive.function.client) EnableConfigurationProperties(org.springframework.boot.context.properties.EnableConfigurationProperties) OAuth2ClientProperties(org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientProperties) OAuth2ClientPropertiesRegistrationAdapter(org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientPropertiesRegistrationAdapter) DateFormat(java.text.DateFormat) ResponseCookie(org.springframework.http.ResponseCookie) ReactorClientHttpConnector(org.springframework.http.client.reactive.ReactorClientHttpConnector) AdvancedByteBufFormat(reactor.netty.transport.logging.AdvancedByteBufFormat) Jackson2JsonDecoder(org.springframework.http.codec.json.Jackson2JsonDecoder) ReactiveClientRegistrationRepository(org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository) MediaType(org.springframework.http.MediaType) org.springframework.security.oauth2.client(org.springframework.security.oauth2.client) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) MultiValueMap(org.springframework.util.MultiValueMap) Mono(reactor.core.publisher.Mono) ClientRegistration(org.springframework.security.oauth2.client.registration.ClientRegistration) Configuration(org.springframework.context.annotation.Configuration) InMemoryReactiveClientRegistrationRepository(org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository) Slf4j(lombok.extern.slf4j.Slf4j) LogLevel(io.netty.handler.logging.LogLevel) JsonInclude(com.fasterxml.jackson.annotation.JsonInclude) StdDateFormat(com.fasterxml.jackson.databind.util.StdDateFormat) Bean(org.springframework.context.annotation.Bean) HttpClient(reactor.netty.http.client.HttpClient) Jackson2JsonDecoder(org.springframework.http.codec.json.Jackson2JsonDecoder) HttpClient(reactor.netty.http.client.HttpClient) ServerOAuth2AuthorizedClientExchangeFilterFunction(org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction) MultiValueMap(org.springframework.util.MultiValueMap) ReactorClientHttpConnector(org.springframework.http.client.reactive.ReactorClientHttpConnector) Jackson2JsonEncoder(org.springframework.http.codec.json.Jackson2JsonEncoder) Bean(org.springframework.context.annotation.Bean)

Example 5 with DbsWebClientConfigurationProperties

use of com.backbase.stream.webclient.configuration.DbsWebClientConfigurationProperties in project stream-services-2.0 by Backbase.

the class DbsWebClientConfigurationTest method testWebClient.

@Test
public void testWebClient() {
    String tokenUri = "http://localhost:" + PORT + "/api/token-converter/oauth/token";
    ClientRegistration clientRegistration = ClientRegistration.withRegistrationId("dbs").clientAuthenticationMethod(ClientAuthenticationMethod.POST).clientId("bb-client").clientSecret("bb-secret").authorizationGrantType(AuthorizationGrantType.CLIENT_CREDENTIALS).tokenUri(tokenUri).build();
    DbsWebClientConfiguration dbsWebClientConfiguration = new DbsWebClientConfiguration();
    DateFormat dateFormat = dbsWebClientConfiguration.dateFormat();
    ObjectMapper objectMapper = dbsWebClientConfiguration.objectMapper(dateFormat);
    List<ClientRegistration> registrations = Collections.singletonList(clientRegistration);
    InMemoryReactiveClientRegistrationRepository registrationRepository = new InMemoryReactiveClientRegistrationRepository(registrations);
    InMemoryReactiveOAuth2AuthorizedClientService clientService = new InMemoryReactiveOAuth2AuthorizedClientService(registrationRepository);
    AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager oAuth2AuthorizedClientManager = new AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager(registrationRepository, clientService);
    ClientCredentialsReactiveOAuth2AuthorizedClientProvider clientProvider = new ClientCredentialsReactiveOAuth2AuthorizedClientProvider();
    oAuth2AuthorizedClientManager.setAuthorizedClientProvider(clientProvider);
    WebClient.Builder builder = WebClient.builder();
    WebClient webClient = dbsWebClientConfiguration.dbsWebClient(objectMapper, oAuth2AuthorizedClientManager, builder, new DbsWebClientConfigurationProperties());
    Assertions.assertNotNull(webClient);
    String testUrl = "http://localhost:" + PORT + "/hello-world";
    Mono<ClientResponse> exchange = webClient.get().uri(testUrl).exchange().doOnNext(clientResponse -> {
        log.info("Client Response Status: " + clientResponse.rawStatusCode());
    }).onErrorResume(HttpClientErrorException.class, error -> {
        log.error("Client Error Response: " + error.getResponseBodyAsString());
        return Mono.error(error);
    });
    StepVerifier.create(exchange).expectNextCount(1).verifyComplete();
}
Also used : ClientResponse(org.springframework.web.reactive.function.client.ClientResponse) StepVerifier(reactor.test.StepVerifier) DbsWebClientConfigurationProperties(com.backbase.stream.webclient.configuration.DbsWebClientConfigurationProperties) LocalDateTime(java.time.LocalDateTime) WebClient(org.springframework.web.reactive.function.client.WebClient) Disabled(org.junit.jupiter.api.Disabled) ClientCredentialsReactiveOAuth2AuthorizedClientProvider(org.springframework.security.oauth2.client.ClientCredentialsReactiveOAuth2AuthorizedClientProvider) ClientAuthenticationMethod(org.springframework.security.oauth2.core.ClientAuthenticationMethod) ZoneOffset(java.time.ZoneOffset) DateFormat(java.text.DateFormat) ClientResponse(org.springframework.web.reactive.function.client.ClientResponse) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager(org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager) Mono(reactor.core.publisher.Mono) ClientRegistration(org.springframework.security.oauth2.client.registration.ClientRegistration) Test(org.junit.jupiter.api.Test) InMemoryReactiveClientRegistrationRepository(org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository) HttpClientErrorException(org.springframework.web.client.HttpClientErrorException) Slf4j(lombok.extern.slf4j.Slf4j) List(java.util.List) OffsetDateTime(java.time.OffsetDateTime) Assertions(org.junit.jupiter.api.Assertions) StdDateFormat(com.fasterxml.jackson.databind.util.StdDateFormat) InMemoryReactiveOAuth2AuthorizedClientService(org.springframework.security.oauth2.client.InMemoryReactiveOAuth2AuthorizedClientService) Collections(java.util.Collections) AuthorizationGrantType(org.springframework.security.oauth2.core.AuthorizationGrantType) ClientCredentialsReactiveOAuth2AuthorizedClientProvider(org.springframework.security.oauth2.client.ClientCredentialsReactiveOAuth2AuthorizedClientProvider) InMemoryReactiveClientRegistrationRepository(org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository) WebClient(org.springframework.web.reactive.function.client.WebClient) ClientRegistration(org.springframework.security.oauth2.client.registration.ClientRegistration) InMemoryReactiveOAuth2AuthorizedClientService(org.springframework.security.oauth2.client.InMemoryReactiveOAuth2AuthorizedClientService) AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager(org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager) DbsWebClientConfigurationProperties(com.backbase.stream.webclient.configuration.DbsWebClientConfigurationProperties) DateFormat(java.text.DateFormat) StdDateFormat(com.fasterxml.jackson.databind.util.StdDateFormat) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Test(org.junit.jupiter.api.Test)

Aggregations

DbsWebClientConfigurationProperties (com.backbase.stream.webclient.configuration.DbsWebClientConfigurationProperties)6 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)6 DateFormat (java.text.DateFormat)6 ClientRegistration (org.springframework.security.oauth2.client.registration.ClientRegistration)6 InMemoryReactiveClientRegistrationRepository (org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository)6 StdDateFormat (com.fasterxml.jackson.databind.util.StdDateFormat)4 Slf4j (lombok.extern.slf4j.Slf4j)4 AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager (org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager)4 ClientCredentialsReactiveOAuth2AuthorizedClientProvider (org.springframework.security.oauth2.client.ClientCredentialsReactiveOAuth2AuthorizedClientProvider)4 InMemoryReactiveOAuth2AuthorizedClientService (org.springframework.security.oauth2.client.InMemoryReactiveOAuth2AuthorizedClientService)4 WebClient (org.springframework.web.reactive.function.client.WebClient)4 Mono (reactor.core.publisher.Mono)4 JsonInclude (com.fasterxml.jackson.annotation.JsonInclude)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)2 DeserializationFeature (com.fasterxml.jackson.databind.DeserializationFeature)2 JavaTimeModule (com.fasterxml.jackson.datatype.jsr310.JavaTimeModule)2 LogLevel (io.netty.handler.logging.LogLevel)2 LocalDateTime (java.time.LocalDateTime)2 OffsetDateTime (java.time.OffsetDateTime)2 ZoneOffset (java.time.ZoneOffset)2