Announcement Announcement Module
Collapse
No announcement yet.
How to get dn of elements after a search ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to get dn of elements after a search ?

    Hi,

    I have a problem with the search function. I make a search in the people branch of my ldap with a specific filter. I receive a list of people with different attributes but not the entrydn attribute.

    The problem is that I need to check the credential of those people by trying a connexion but I don't have their Distinguished name. Unfortunately, the people branch is not a flat branch, I have a lot of sub-branches so all peoples have different dn suffix (ex: uid=123, ou=people, ... uid=456, ou=marketing, ou=people, and so on)

    I know that this LDAP structure is uggly but I can't change it.

    Is it possible to get the dn (entryDN for SUN LDAP) attribute within a search with spring-ldap ? (it works with pure jndi)

  • #2
    If you use a ContextMapper instead of an AttributesMapper you will be passed a DirContextAdapter from which you will be able to get the DN.

    Comment


    • #3
      Cool, it works fine.

      It's my firsts spteps with spring-ldap (I used pure jndi) and I realy enjoy your reactivity.

      Thank's

      Comment

      Working...
      X