public class

PersonContextMapper

extends Object
implements UserDetailsContextMapper
java.lang.Object
   ↳ org.springframework.security.ldap.userdetails.PersonContextMapper

Summary

Public Constructors
PersonContextMapper()
Public Methods
UserDetails mapUserFromContext(DirContextOperations ctx, String username, Collection<? extends GrantedAuthority> authorities)
Creates a fully populated UserDetails object for use by the security framework.
void mapUserToContext(UserDetails user, DirContextAdapter ctx)
Reverse of the above operation.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.security.ldap.userdetails.UserDetailsContextMapper

Public Constructors

public PersonContextMapper ()

Public Methods

public 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 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.