Class DefaultLdapUsernameToDnMapper
- java.lang.Object
-
- org.springframework.security.ldap.DefaultLdapUsernameToDnMapper
-
- All Implemented Interfaces:
LdapUsernameToDnMapper
public class DefaultLdapUsernameToDnMapper extends java.lang.Object implements LdapUsernameToDnMapper
This implementation appends a name component to the userDnBase context using the usernameAttributeName property. So if the uid attribute is used to store the username, and the base DN is cn=users and we are creating a new user called "sam", then the DN will be uid=sam,cn=users.
-
-
Constructor Summary
Constructors Constructor Description DefaultLdapUsernameToDnMapper(java.lang.String userDnBase, java.lang.String usernameAttribute)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.ldap.core.DistinguishedName
buildDn(java.lang.String username)
Assembles the Distinguished Name that should be used the given username.
-
-
-
Method Detail
-
buildDn
public org.springframework.ldap.core.DistinguishedName buildDn(java.lang.String username)
Assembles the Distinguished Name that should be used the given username.- Specified by:
buildDn
in interfaceLdapUsernameToDnMapper
-
-