BSP / HowTo: Fun with LDAP and BSP’s
First things first, you need a LDAP server. We use Siemens DirX. I talked to our LDAP master and he told me the connection settings and then I went to the Help website and looked at the docs on how to connect the LDAP to the system. At first I was expecting some long horrible process of configuration and settings. Boy, was I surprised!
As you can see I gave the BASE in hard coded as well which in this LDAP test server is just a simple tree structure. Oh and take out the space before and after the br in the CONCATENATE statement. I had to put it like that for the weblog since I didn’t want to load each of these sections into separate textareas.
Here’s the complete code for the Event Handler.
So now you have the complete code as well as hopefully an understanding of each section of it. You’ll notice that I actually give various numeric results to Result this is simply so I can see at which point an error comes if one comes.
- 0 = OK
- 1 = Not found in LDAP
- 2 = No Connection
- 3 = No search string given
So that’s about it, I’ve since gone on to enhance my “test” page with putting the results into a table for a nicer output but I think you’ll get the idea just the same with this example.