Class LdapUserDetailsService

All Implemented Interfaces:

public class LdapUserDetailsService extends Object implements UserDetailsService
LDAP implementation of UserDetailsService based around an LdapUserSearch and an LdapAuthoritiesPopulator. The final UserDetails object returned from loadUserByUsername is created by the configured UserDetailsContextMapper.
  • Constructor Details

  • Method Details

    • loadUserByUsername

      public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException
      Description copied from interface: UserDetailsService
      Locates the user based on the username. In the actual implementation, the search may possibly be case sensitive, or case insensitive depending on how the implementation instance is configured. In this case, the UserDetails object that comes back may have a username that is of a different case than what was actually requested..
      Specified by:
      loadUserByUsername in interface UserDetailsService
      username - the username identifying the user whose data is required.
      a fully populated user record (never null)
      UsernameNotFoundException - if the user could not be found or the user has no GrantedAuthority
    • setUserDetailsMapper

      public void setUserDetailsMapper(UserDetailsContextMapper userDetailsMapper)