-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Add reactive handle method to ServerCsrfTokenRequestHandler #18558
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks for the PR! Unfortunately, the changes in this pull request are not passive and we cannot accept it as it is. For this to be accepted, we cannot change the method signature. Instead, you probably need to:
Are you able to update the PR accordingly? |
|
Sure, I will update the PR ASAP |
| /** | ||
| * Handles a request using a {@link CsrfToken}. | ||
| * @param exchange the {@code ServerWebExchange} with the request being handled | ||
| * @param csrfToken the {@code Mono<CsrfToken>} created by the | ||
| * {@link ServerCsrfTokenRepository} | ||
| * @return a {@code Mono} that completes when handling is finished | ||
| */ | ||
| default Mono<Void> handleAsync(ServerWebExchange exchange, Mono<CsrfToken> csrfToken) { | ||
| handle(exchange, csrfToken); | ||
| return Mono.empty(); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this method name suit us?
Adds a default reactive handle method returning Mono<Void> and deprecates the legacy void handle method in preparation for Spring Security 8. Closes: spring-projectsgh-16869 Signed-off-by: Andrey Litvitski <[email protected]>
|
Flaky test I guess? |
Returning Mono from
ServerCsrfTokenRequestHandler#handlewould allow non-blocking response writes.Closes: gh-16869