Hi Alex,
The short answer is because the LDAP store has not been updated yet.
The long answer is that the earlier revisions of C::P::Authentication
allowed only one piece of identifying information - the username.
Internally this was used as the 'id' to do things such as retrieve
the user from the session. Since I don't know what every other
module does internally, I though it best to keep with that.
JayK
On Jul 23, 2007, at 4:12 AM, Hartmaier Alexander wrote:
Hi JayK!
Works for me, but why do I have to use id instead of username for
the LDAP
store?
-Alex
-----Original Message-----
From: Jay K [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 22, 2007 5:13 AM
To: The elegant MVC web framework; Development of the elegant MVC web
framework
Subject: [Catalyst] Maintenance release: C::P::Authentication
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
_______________________________________________
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/
_______________________________________________
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/