[Catalyst-dev] Maintenance release: C::P::Authentication
Jay K
jayk at ion0.com
Sun Jul 22 04:13:28 GMT 2007
Hey all,
Turns out there was a minor bug in C::P::Authentication - this didn't
affect updated modules, but it did limit the compatibility of older
modules with the new Auth.
I've uploaded a maintenance release to CPAN which fixes this bug.
I should also note that after fixing this bug, the LDAP module is now
fully compatible with realms (with a slightly different config)
Basically - you avoid placing the LDAP store in the 'use Catalyst'
line and instead configure auth as follows:
> __PACKAGE__->config(
> authentication => {
> default_realm => 'users',
> realms => {
> users => {
> credential => {
> class => 'Password',
> password_field => 'password',
> password_type => 'self_check',
> },
> store => {
> class => 'LDAP::Backend',
> [ ... rest of LDAP config ]
> }
> }
> }
> }
> );
Then just replace your $c->login call with $c->authenticate, as follows:
> old:
>
> $c->login($username, $password);
>
> new:
>
> $c->authenticate({ id => $username, password => $password });
I post this because this may work with other 'old-style' modules too
- and is worth trying as an initial step towards migrating to realms.
Anyway - thanks to Wade (aka waswas) for helping track this problem
down.
JayK
---
For most things, throwing yourself at the wall over and over is a
better way to improve than thinking hard about the wall and taking
pictures of it. -- D.Litwack
More information about the Catalyst-dev
mailing list