public class

LdapUserDetailsService

extends Object
implements UserDetailsService
java.lang.Object
   ↳ org.springframework.security.ldap.userdetails.LdapUserDetailsService

Class Overview

LDAP implementation of UserDetailsService based around an LdapUserSearch and an LdapAuthoritiesPopulator. The final UserDetails object returned from loadUserByUsername is created by the configured UserDetailsContextMapper.

Summary

Public Constructors
LdapUserDetailsService(LdapUserSearch userSearch)
LdapUserDetailsService(LdapUserSearch userSearch, LdapAuthoritiesPopulator authoritiesPopulator)
Public Methods
UserDetails loadUserByUsername(String username)
Locates the user based on the username.
void setUserDetailsMapper(UserDetailsContextMapper userDetailsMapper)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.security.core.userdetails.UserDetailsService

Public Constructors

public LdapUserDetailsService (LdapUserSearch userSearch)

public LdapUserDetailsService (LdapUserSearch userSearch, LdapAuthoritiesPopulator authoritiesPopulator)

Public Methods

public UserDetails loadUserByUsername (String username)

Locates the user based on the username. In the actual implementation, the search may possibly be case insensitive, 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..

Parameters
username the username identifying the user whose data is required.
Returns
  • a fully populated user record (never null)

public void setUserDetailsMapper (UserDetailsContextMapper userDetailsMapper)