Here is a model that I created - http://pastebin.com/BrWBueU8. It is based loosely off of the PHP class presented by idbobby at http://us2.php.net/manual/en/ref.ldap.php. Basically this will take an LDAP authentication and validate that a user account exists within active directory. If you are looking to do auth with this, you can simply pass the username and password provided as the username and password to bind to ldap. If it returns an object then the credentials were valid, if it does not then the user's login was incorrect.
All you would need to do at that point is find the user's id in your users table and pass the that to the $this->Auth->login function. This would allow you to authenticate. This isn't the most elegant solution, but it may solve the problem you are having. Hope this helps, Vinnie On Tuesday, September 11, 2012 5:23:20 PM UTC-4, wchopite wrote: > > Check that you have loaded the extension php for ldap. Check this on your > php.ini > > Sorry my english > El sep 11, 2012 10:41 a.m., "Sulian Lanteri" > <[email protected]<javascript:>> > escribió: > >> Dear all, >> >> I'm under CakePHP 2.2 and I would like to connect it to a LDAP (openLDAP >> on MacOS X) but I can't find any solutions :( . The article on >> http://www.analogrithems.com/rant/2012/01/03/cakephp-2-0-ldapauth/doesn't >> work and I'm unable to use the analogrithems/idbroker sources from >> GitHub... >> >> If anybody can help me... >> >> Many thanks >> >> Sulian >> >> * <https://github.com/analogrithems/idbroker>* >> >> -- >> You received this message because you are subscribed to the Google Groups >> "CakePHP" group. >> To post to this group, send email to [email protected]<javascript:> >> . >> To unsubscribe from this group, send email to >> [email protected] <javascript:>. >> Visit this group at http://groups.google.com/group/cake-php?hl=en-US. >> >> >> > -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
