public class LdapUserDetailsService extends Object implements UserDetailsService
LdapUserSearch
and an LdapAuthoritiesPopulator
. The final UserDetails object
returned from loadUserByUsername is created by the configured UserDetailsContextMapper.Constructor and Description |
---|
LdapUserDetailsService(LdapUserSearch userSearch) |
LdapUserDetailsService(LdapUserSearch userSearch,
LdapAuthoritiesPopulator authoritiesPopulator) |
Modifier and Type | Method and Description |
---|---|
UserDetails |
loadUserByUsername(String username)
Locates the user based on the username.
|
void |
setUserDetailsMapper(UserDetailsContextMapper userDetailsMapper) |
public LdapUserDetailsService(LdapUserSearch userSearch)
public LdapUserDetailsService(LdapUserSearch userSearch, LdapAuthoritiesPopulator authoritiesPopulator)
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException
UserDetailsService
UserDetails
object that comes back may have a username that is of a different case than what was
actually requested..loadUserByUsername
in interface UserDetailsService
username
- the username identifying the user whose data is required.null
)UsernameNotFoundException
- if the user could not be found or the user has no GrantedAuthoritypublic void setUserDetailsMapper(UserDetailsContextMapper userDetailsMapper)