-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Open
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triagedtype: bugA general bugA general bug
Description
Describe the bug
org.springframework.security.oauth2.client.web.reactive.function.client.ServletOAuth2AuthorizedClientExchangeFilterFunction
depends on Interfaces from the Reactive org.springframework.web.reactive
package and therefore can not be used by non-reactive Applications without pulling in tons of unused dependencies.
java: cannot access org.springframework.web.reactive.function.client.ExchangeFilterFunction
class file for org.springframework.web.reactive.function.client.ExchangeFilterFunction not found
To Reproduce
pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-client</artifactId>
</dependency>
Java:
OAuth2ClientHttpRequestInterceptor oAuth2ClientHttpRequestInterceptor = new OAuth2ClientHttpRequestInterceptor(oAuth2AuthorizedClientManager);
// compiler error line:
Consumer<Map<String, Object>> requestAttributeCustomizer = ServletOAuth2AuthorizedClientExchangeFilterFunction.clientRegistrationId("my-client-id");
RestTemplate restTemplate = new RestTemplateBuilder()
.connectTimeout(Duration.of(5L, ChronoUnit.SECONDS))
.readTimeout(Duration.of(10L, ChronoUnit.SECONDS))
// required here:
.requestCustomizers(request -> requestAttributeCustomizer.accept(request.getAttributes()))
.additionalInterceptors(oAuth2ClientHttpRequestInterceptor)
.build();
Expected behavior
Class org.springframework.security.oauth2.client.web.reactive.function.client.ServletOAuth2AuthorizedClientExchangeFilterFunction
should not depend on classes/interfaces of foreign projects/packages e.g. org.springframework.web.reactive.function.client.ExchangeFilterFunction
Metadata
Metadata
Assignees
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triagedtype: bugA general bugA general bug