Mentioned on irc, but you can drop the Credential portion of this altogether.
All you need to do is use the standard Password credential and set the password_type config option to be 'self_check', and it will do what you want, actually almost _exactly_ what your code does in fact. The check_password() method is called against the user object, though, not the store. Beyond that, I have not worked with LDAP in a very long time.... so the other bits someone else will have to comment on. Jay On Apr 12, 2007, at 2:10 PM, Evan Carroll wrote:
I've create a new version of C::P::A::LDAP to work with the new C::P::A api more info at a: http://search.cpan.org/~jayk/Catalyst-Plugin-Authentication/lib/ Catalyst/Plugin/Authentication.pm The new version has run-time configuration of dns and rules, this allows namespaces that can be configured at login. This functionality is required by portal like sites that need namespaces for each client/company. It also has full store functionality so it won't hit the directory on each successive call to $c->user. so you can do something like base_dn: dc=%s,dc=%s,ou=clients;o=Company and resolve that on a call to ->authenticate( {basedn_values = [ 'foo', 'com'], id => 'username', pw => 'password' } ); As a last note this version also keeps a config object from login which mirrors the C::P::A::LDAP config on compile time, but reflects the modifications made on the call to ->authenticate(), this can be accessed with $c->user->config and utilized from within a module. Examples of applications in pod. I don't have any tests created largely because I don't see any useful ones that are easily created, but there is documentation in the .tar.gz as pody.pod. You can find a copy at http://64.200.109.9/LDAP.tar.gz comments welcome. -- Evan Carroll System Lord of the Internets [EMAIL PROTECTED] 888-403-9143 ps unban me from #catalyst. _______________________________________________ List: [EMAIL PROTECTED] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/ [EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
--- America will never be destroyed from the outside. If we falter and lose our freedoms, it will be because we destroyed ourselves. -- Abraham Lincoln _______________________________________________ List: [EMAIL PROTECTED] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/