Settings

Theme

Show HN: LDAP DN – PHP library for parsing and manipulating Distinguished Names

github.com

4 points by PawelDecowski 5 years ago · 1 comment

Reader

PawelDecowskiOP 5 years ago

Hello, fellow hackers! Author of LDAP DN here.

Recently, I was working on a legacy PHP project that synchronises LDAP teams and users. I found several bugs relating to poor DN “parsing” using regexes and string replacement.

There has to be a better way of doing it, I thought. Alas, there’s not much choice in the PHP ecosystem when it comes to parsing DNs. While there are a few libraries and even PHP’s own `ldap_explode_dn()`, I think they don’t have clean APIs.

So I wrote LDAP DN. It breaks down DNs into RDNs and attributes, supports escaping, allows basic manipulation and has 100% test coverage.

Let me know what you think!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection