Skip to content

mapToUser/mapToGrantedAuthority in JdbcUserDetailsManager to become protected #16540

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

Closed
flozano opened this issue Feb 5, 2025 · 1 comment · Fixed by #16561
Closed

mapToUser/mapToGrantedAuthority in JdbcUserDetailsManager to become protected #16540

flozano opened this issue Feb 5, 2025 · 1 comment · Fixed by #16561
Assignees
Labels
in: core An issue in spring-security-core status: duplicate A duplicate of another issue type: enhancement A general enhancement

Comments

@flozano
Copy link

flozano commented Feb 5, 2025

Expected Behavior

I'd like to be able to override mapToUser and mapToGrantedAuthority in order to be able to customize how the user is mapped and what's the actual class to be used, and what's the instance of GrantedAuthority to be used.

Current Behavior

	private UserDetails mapToUser(ResultSet rs, int rowNum) throws SQLException {

Context
JdbcUserDetailsManager is not final and can be extended to override some of its behavior. It already has protected methods. By making this one protected, the extensibility can be much simplified.

The loadUsersByUsername is protected and can be extended already, so this is a minimal change.

@flozano flozano added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Feb 5, 2025
@flozano flozano changed the title mapToUser in JdbcUserDetailsManager to become protected mapToUser/mapToGrantedAuthority in JdbcUserDetailsManager to become protected Feb 5, 2025
big-cir added a commit to big-cir/spring-security that referenced this issue Feb 10, 2025
big-cir added a commit to big-cir/spring-security that referenced this issue Feb 10, 2025
big-cir added a commit to big-cir/spring-security that referenced this issue Feb 14, 2025
big-cir added a commit to big-cir/spring-security that referenced this issue Feb 14, 2025
big-cir added a commit to big-cir/spring-security that referenced this issue Feb 15, 2025
@jzheaux jzheaux added in: core An issue in spring-security-core and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 24, 2025
@jzheaux jzheaux self-assigned this Feb 24, 2025
@jzheaux
Copy link
Contributor

jzheaux commented Feb 24, 2025

Closing in favor of #16561

@jzheaux jzheaux closed this as completed Feb 24, 2025
@jzheaux jzheaux added the status: duplicate A duplicate of another issue label Feb 24, 2025
jzheaux pushed a commit that referenced this issue Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
2 participants