public interface

UserDetailsContextMapper

org.springframework.security.ldap.userdetails.UserDetailsContextMapper
Known Indirect Subclasses

Class Overview

Operations to map a UserDetails object to and from a Spring LDAP DirContextOperations implementation. Used by LdapUserDetailsManager when loading and saving/creating user information, and also by the LdapAuthenticationProvider to allow customization of the user data loaded during authentication.

Summary

Public Methods
abstract UserDetails mapUserFromContext(DirContextOperations ctx, String username, Collection<? extends GrantedAuthority> authorities)
Creates a fully populated UserDetails object for use by the security framework.
abstract void mapUserToContext(UserDetails user, DirContextAdapter ctx)
Reverse of the above operation.

Public Methods

public abstract UserDetails mapUserFromContext (DirContextOperations ctx, String username, Collection<? extends GrantedAuthority> authorities)

Creates a fully populated UserDetails object for use by the security framework.

Parameters
ctx the context object which contains the user information.
username the user's supplied login name.
Returns
  • the user object.

public abstract void mapUserToContext (UserDetails user, DirContextAdapter ctx)

Reverse of the above operation. Populates a context object from the supplied user object. Called when saving a user, for example.