Skip to content

Fix the problem of not deserializing SwitchUserGrantedAuthority in Webflux #17064

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JohnNiang
Copy link
Contributor

This PR moves the SwitchUserGrantedAuthorityMixIn annotations into WebJackson2Module instead of WebServlet Jackson2Module to fix the deserialization problem of SwitchUserGrantedAuthority in Webflux.

Fixes #17041

@JohnNiang JohnNiang force-pushed the refactor/add-siwtchusermixin-to-webjackson2module branch from 351a808 to cab6817 Compare May 7, 2025 02:59
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 7, 2025
Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, @JohnNiang! Thanks for the quick turnaround.

In addition to my inline feedback will you please also:

  1. Add unit tests to demonstrate that the feature works
  2. Update the commit message to contains Closes gh-17041 on a separate line from the title like so:
Add SwitchUserGrantedAuthority to WebFlux Jackson Module

Closes gh-17041

@jzheaux jzheaux self-assigned this May 7, 2025
@jzheaux jzheaux added in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels May 7, 2025
@jzheaux jzheaux added this to the 7.0.x milestone May 7, 2025
@JohnNiang JohnNiang force-pushed the refactor/add-siwtchusermixin-to-webjackson2module branch from cab6817 to ad0485f Compare May 8, 2025 03:02
Closes spring-projectsgh-17041

Signed-off-by: John Niang <johnniang@foxmail.com>
@JohnNiang JohnNiang force-pushed the refactor/add-siwtchusermixin-to-webjackson2module branch from ad0485f to 8da8dee Compare May 8, 2025 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SwitchUserGrantedAuthority cannot be deserialized in Webflux
3 participants