mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-14 16:12:14 +00:00
Make mapToUser and mapToGrantedAuthority protected in JdbcUserDetailsManager
- Closes gh-16540 Signed-off-by: dae won <eodnjs01477@gmail.com>
This commit is contained in:
parent
ba273aba43
commit
e8fe003c4c
@ -181,7 +181,7 @@ public class JdbcUserDetailsManager extends JdbcDaoImpl implements UserDetailsMa
|
|||||||
return getJdbcTemplate().query(getUsersByUsernameQuery(), this::mapToUser, username);
|
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 userName = rs.getString(1);
|
||||||
String password = rs.getString(2);
|
String password = rs.getString(2);
|
||||||
boolean enabled = rs.getBoolean(3);
|
boolean enabled = rs.getBoolean(3);
|
||||||
@ -390,7 +390,7 @@ public class JdbcUserDetailsManager extends JdbcDaoImpl implements UserDetailsMa
|
|||||||
this::mapToGrantedAuthority);
|
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);
|
String roleName = getRolePrefix() + rs.getString(3);
|
||||||
return new SimpleGrantedAuthority(roleName);
|
return new SimpleGrantedAuthority(roleName);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user