Interface UserDetailsContextMapper
-
- All Known Implementing Classes:
InetOrgPersonContextMapper
,LdapUserDetailsMapper
,PersonContextMapper
public interface UserDetailsContextMapper
Operations to map a UserDetails object to and from a Spring LDAPDirContextOperations
implementation. Used byLdapUserDetailsManager
when loading and saving/creating user information, and also by theLdapAuthenticationProvider
to allow customization of the user data loaded during authentication.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UserDetails
mapUserFromContext(org.springframework.ldap.core.DirContextOperations ctx, java.lang.String username, java.util.Collection<? extends GrantedAuthority> authorities)
Creates a fully populated UserDetails object for use by the security framework.void
mapUserToContext(UserDetails user, org.springframework.ldap.core.DirContextAdapter ctx)
Reverse of the above operation.
-
-
-
Method Detail
-
mapUserFromContext
UserDetails mapUserFromContext(org.springframework.ldap.core.DirContextOperations ctx, java.lang.String username, java.util.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.authorities
-- Returns:
- the user object.
-
mapUserToContext
void mapUserToContext(UserDetails user, org.springframework.ldap.core.DirContextAdapter ctx)
Reverse of the above operation. Populates a context object from the supplied user object. Called when saving a user, for example.
-
-