vt-middleware / ldaptive

A simple, extensible Java API for interacting with LDAP servers
56 stars 26 forks source link

[Question/Feature Request] Turn off follow referrals? #223

Closed stephen-crawford closed 2 years ago

stephen-crawford commented 2 years ago

Hi,

I have been looking through the documentation on the ldaptive website, but could not find an answer so wanted to ask directly. Is it possible to configure a searchReferenceHandler so that it does not follow referrals? There are options for configuring the search depth and limit, but I do not see any API functionality for preventing the automated following of referrals--i.e. simply stopping a connection instead of getting partial connections when an AD LDAP server.

If I have missed something please let me know.

Thank you!

dfish3r commented 2 years ago

By default references are not followed, you have to configure a FollowSearchResultReferenceHandler to get that behavior. If you just need to inspect the references they are available at SearchResponse#getReferences

stephen-crawford commented 2 years ago

Thank you!