Class PersonContextMapper
java.lang.Object
org.springframework.security.ldap.userdetails.PersonContextMapper
- All Implemented Interfaces:
UserDetailsContextMapper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.userdetails.UserDetails
mapUserFromContext
(org.springframework.ldap.core.DirContextOperations ctx, String username, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) Creates a fully populated UserDetails object for use by the security framework.void
mapUserToContext
(org.springframework.security.core.userdetails.UserDetails user, org.springframework.ldap.core.DirContextAdapter ctx) Reverse of the above operation.
-
Constructor Details
-
PersonContextMapper
public PersonContextMapper()
-
-
Method Details
-
mapUserFromContext
public org.springframework.security.core.userdetails.UserDetails mapUserFromContext(org.springframework.ldap.core.DirContextOperations ctx, String username, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) Description copied from interface:UserDetailsContextMapper
Creates a fully populated UserDetails object for use by the security framework.- Specified by:
mapUserFromContext
in interfaceUserDetailsContextMapper
- Parameters:
ctx
- the context object which contains the user information.username
- the user's supplied login name.- Returns:
- the user object.
-
mapUserToContext
public void mapUserToContext(org.springframework.security.core.userdetails.UserDetails user, org.springframework.ldap.core.DirContextAdapter ctx) Description copied from interface:UserDetailsContextMapper
Reverse of the above operation. Populates a context object from the supplied user object. Called when saving a user, for example.- Specified by:
mapUserToContext
in interfaceUserDetailsContextMapper
-