Repository navigation
Conversation
…tExchangeFilterFunction Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Signed-off-by: jay23606 <4602056+jay23606@users.noreply.github.com>
jay23606
force-pushed
the
pr-go-simple/17379
branch
from
November 27, 2026 16:11
aa89a77 to
5fd1c20
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #17379.
ServletOAuth2AuthorizedClientExchangeFilterFunction.filter()merges theHttpServletRequest,HttpServletResponseandAuthenticationfrom the Reactor context into a request, but it then built the bearer request and the fallback exchange from the original request. When the filter is added withWebClient.Builder.filter()instead ofoauth2Configuration(), the attributes exist only in the context, so theAuthorizationFailureForwardersaw a request with no servlet request/response and could not remove the authorized client on a 401/403 response.The fix merges the request once at the start of
filter()and runs the rest of the pipeline on the merged request. Behavior is otherwise unchanged.Added regression test
filterWhenUnauthorizedAndServletAttributesFromContextThenInvokeFailureHandlerWithServletAttributes, which supplies the servlet attributes only through the Reactor context and asserts the failure handler receives them.Tests: not run locally (no dependency installation was allowed here). CI should run the
oauth2-clientmodule tests, in particularServletOAuth2AuthorizedClientExchangeFilterFunctionTestsandServletOAuth2AuthorizedClientExchangeFilterFunctionITests.Tests not run here: Gradle test run for the oauth2-client module (ServletOAuth2AuthorizedClientExchangeFilterFunctionTests and ITests) — not run locally because the rules forbid installing dependencies here; CI runs them.
Fixes #17379