LdapUserDetailsMapper now throws UnsupportedOperationException for mapUserToContext method as only subclasses of this which implement actual LDAP object classes should be used for writing to a directory.
This commit is contained in:
parent
22052115b6
commit
3ddcc203bf
|
@ -28,7 +28,7 @@ import org.springframework.ldap.core.DirContextOperations;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The context mapper used by the authenticators to create an ldap user object.
|
* The context mapper used by the LDAP authentication provider to create an LDAP user object.
|
||||||
*
|
*
|
||||||
* @author Luke Taylor
|
* @author Luke Taylor
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
|
@ -89,7 +89,8 @@ public class LdapUserDetailsMapper implements UserDetailsContextMapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mapUserToContext(UserDetails user, DirContextAdapter ctx) {
|
public void mapUserToContext(UserDetails user, DirContextAdapter ctx) {
|
||||||
|
throw new UnsupportedOperationException("LdapUserDetailsMapper only supports reading from a context. Please" +
|
||||||
|
"use a subclass if mapUserToContext() is required.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue