xain
xain

Reputation: 13849

LDAP search filter expression utility or library

in this project we intend to reuse ldap search expressions for a system other than the LDAP server itself.

The idea is to fetch the expression - something like (|(attr1='A')(!(attr2='1'))) - and perform certain actions. Does anybody know of the existence of a library or utility to interpret such expressions ?

Thanks

Upvotes: 1

Views: 1231

Answers (2)

Neil Wilson
Neil Wilson

Reputation: 1736

The UnboundID LDAP SDK for Java includes a Filter class that can be used to construct and parse search filter strings like the one you have listed. The Filter class also provides a matchesEntry method that can be used to determine whether a filter matches a provided entry using only client-side logic.

Upvotes: 1

JPBlanc
JPBlanc

Reputation: 72680

It's a polish expression, for that you can use ANTLR 3 I think the grammar exists. Parhaps the thing you are looking for is there.

Upvotes: 1

Related Questions