Hi All,
As written on the subject, how can I achieve that?
I am using ldapTemplate 1.0.2 since I am now extending a third party application that is using that version of ldapTemplate, which I believe is the earlier version of Spring-LDAP.
Currently I'm able to get operational attributes by using this following code, but only userPassword attributes is not returned.
Regards,Code:SearchControls controls = new SearchControls(); controls.setSearchScope(SearchControls.SUBTREE_SCOPE); controls.setReturningObjFlag(false); controls.setReturningAttributes(new String[]{"userPassword","uid","initials"}); //controls.setReturningAttributes(null); List result = ldapTemplate.search("", LdapUtils.getFilterWithValues(filter, principal.toString()), controls, new AttributesMapper() { public Object mapFromAttributes(Attributes attrs) throws NamingException { Attribute attrUid = attrs.get("uid"); Attribute attrInitials = attrs.get("initials"); .... lines omitted ...
Sukma


Reply With Quote
