Make mapToUser and mapToGrantedAuthority protected in JdbcUserDetailsManager

- Closes gh-16540

Signed-off-by: dae won <eodnjs01477@gmail.com>
This commit is contained in:
dae won 2025-02-10 15:39:10 +09:00 committed by Josh Cummings
parent ba273aba43
commit e8fe003c4c

View File

@ -181,7 +181,7 @@ public class JdbcUserDetailsManager extends JdbcDaoImpl implements UserDetailsMa
return getJdbcTemplate().query(getUsersByUsernameQuery(), this::mapToUser, username);
}
private UserDetails mapToUser(ResultSet rs, int rowNum) throws SQLException {
protected UserDetails mapToUser(ResultSet rs, int rowNum) throws SQLException {
String userName = rs.getString(1);
String password = rs.getString(2);
boolean enabled = rs.getBoolean(3);
@ -390,7 +390,7 @@ public class JdbcUserDetailsManager extends JdbcDaoImpl implements UserDetailsMa
this::mapToGrantedAuthority);
}
private GrantedAuthority mapToGrantedAuthority(ResultSet rs, int rowNum) throws SQLException {
protected GrantedAuthority mapToGrantedAuthority(ResultSet rs, int rowNum) throws SQLException {
String roleName = getRolePrefix() + rs.getString(3);
return new SimpleGrantedAuthority(roleName);
}