There is no way to give a custom UserDetailContextMapper to the LDAPAuthenticationProvider.
Whereas the LDAPAuthenticationProvider has a specific setter for this functionality
Luke Taylor said:
Not a bug as it isn’t intended that the namespace reproduces every feature of the underlying bean classes. Nevertheless it’s something that I’ve been planning on adding to the LDAP namespace support at some point.
I've added the attribute user-context-mapper-ref which can be used as an alternative to user-class.