-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Servlet/Server BearerExchangeFilterFunction #7353
Comments
This is reasonable feedback, thanks @jgrandja. Regarding the |
Regarding whether to make Is there any flaw in that logic that you see about UPDATE: Actually, removing |
@jzheaux @jgrandja ServletBearerExchangeFilterFunction bearer = new ServletBearerExchangeFilterFunction();
WebClient webClient = webClientBuilder//it is a bean
.filter((request, next) -> //it could be added implicitly by WebClientCustomizer
Mono.deferWithContext(ctx -> next.exchange(addMyData(request, ctx)))
)
.filter(bearer)
.build();
// in my service
MyPojo data = webClient
.get()
.uri(myUri)
.retrieve()
.bodyToMono(MyPojo.class)
.timeout(Duration.ofMillis(10000))
.retry(3, TimeoutException.class::isInstance)
.block(); So my questions:
|
Related #7330
I'd like to propose the following changes before this goes RC1:
ServletBearerExchangeFilterFunction
org.springframework.security.oauth2.server.resource.web
toorg.springframework.security.oauth2.server.resource.web.reactive.function.client
- this aligns with packaging forServletOAuth2AuthorizedClientExchangeFilterFunction
andExchangeFilterFunction
final
defaultRequest()
private
authentication(Authentication authentication)
- isn't it sufficient just to look up inThreadLocal
? What is the use case where this would be set other than what's in theThreadLocal
?getOAuth2Token()
returnsnull
the filter will fail? It doesn't seem like we have a test for this?ServerBearerExchangeFilterFunction
ServletBearerExchangeFilterFunction
The text was updated successfully, but these errors were encountered: