For the benefit of the list:

This issue has been resolved.  It turned out to be a disagreement
between what C::P::Authenticaiton was trying to place in $user->store
() and what LDAP was trying to place in $user->store()

LDAP was correct, and C::P::Authentication should keep it's grubby
little hands off of $user->store() - I am pushing a maintenance
release of C::P::Authentication to CPAN now.  Should be available
from CPAN in a few hours.

JayK

On Jul 21, 2007, at 6:51 PM, [EMAIL PROTECTED] wrote:





Folks,


      I have been wracking my head on this for a few days now (with
jayk
and mst offering much appreciated support on irc).  It appears that
the
LDAP store (both .4 and .5) does not play nicely with the new auth .10
changes.  From what I have been able to diagnose it appears as
though there
is an issue with object stringification between auth/credpassword
and ldap
store. The root error shown (when running with debug on and using
any of
the LDAP store generated accessors such as $c->user->username ) is :


[error] Caught exception in TestLDAP::Controller::Auth->login
"Can't use
string ("Catalyst::Plugin::Authentication") as a HASH ref while
"strict
refs" in use at /Library/Perl/5.8.6/Class/Accessor/Fast.pm line 39.
 at /Library/Perl/5.8.6/Class/Accessor/Fast.pm line 39


Placing a local $SIG{__DIE__} = \&Carp::confess; on line 38 of
C::A::F I
get a dump such as this:

[error] Caught exception in TestLDAP::Controller::Auth->login
"Can't use
string ("Catalyst::Plugin::Authentication") as a HASH ref while
"strict
refs" in use at /Library/Perl/5.8.6/Class/Accessor/Fast.pm line 39.
 at /Library/Perl/5.8.6/Class/Accessor/Fast.pm line 39

Class::Accessor::Fast::__ANON__
('Catalyst::Plugin::Authentication::Store::LDAP::Backend')
 called at /Library/Perl/5.8.6
/Catalyst/Plugin/Authentication/Store/LDAP/User.pm line 95

Catalyst::Plugin::Authentication::Store::LDAP::User::stringify
('Catalyst::Plugin::Authentication::Store::LDAP::User=HASH(0x1b...')
 called at /Library/Perl/5.8.6
/Catalyst/Plugin/Authentication/Store/LDAP/User.pm line 50

Catalyst::Plugin::Authentication::Store::LDAP::User::__ANON__
('Catalyst::Plugin::Authentication::Store::LDAP::User=HASH(0x1b...',
 'undef', '') called at /Library/Perl/5.8.6
/Catalyst/Plugin/Authentication/Credential/Password.pm line 141

Catalyst::Plugin::Authentication::Credential::Password::login
('TestLDAP=HASH(0x1bdf4cc)',
 'USERNAME', 'PASSWORD') called at
/Volumes/stuffs/Apps/TestLDAP/script/../lib/TestLDAP/Controller/
Auth.pm
line 47

TestLDAP::Controller::Auth::login('TestLDAP::Controller::Auth=HASH
(0x1b66f90)',
 'TestLDAP=HASH(0x1bdf4cc)') called at /Library/Perl/5.8.6
/Catalyst/Action.pm line 47
        Catalyst::Action::execute('Catalyst::Action=HASH(0x1bc3350)',
'TestLDAP::Controller::Auth=HASH(0x1b66f90)', 'TestLDAP=HASH
(0x1bdf4cc)')
called at /Library/Perl/5.8.6/Catalyst/Action.pm line 32

Catalyst::Action::__ANON__('TestLDAP::Controller::Auth=HASH
(0x1b66f90)',
'TestLDAP=HASH(0x1bdf4cc)') called at /Library/Perl/5.8.6/
Catalyst.pm line
1187
        eval {...} called at /Library/Perl/5.8.6/Catalyst.pm line 1187
        Catalyst::execute('TestLDAP=HASH(0x1bdf4cc)',
'TestLDAP::Controller::Auth', 'Catalyst::Action=HASH(0x1bc3350)')
called at
/Library/Perl/5.8.6/Catalyst/Action.pm line 42
        Catalyst::Action::dispatch('Catalyst::Action=HASH(0x1bc3350)',
'TestLDAP=HASH(0x1bdf4cc)') called at /Library/Perl/5.8.6
/Catalyst/Controller.pm line 74

Catalyst::Controller::_ACTION('TestLDAP::Controller::Auth=HASH
(0x1b66f90)',
'TestLDAP=HASH(0x1bdf4cc)') called at /Library/Perl/5.8.6
/Catalyst/Action.pm line 47
        Catalyst::Action::execute('Catalyst::Action=HASH(0x1bb230c)',
'TestLDAP::Controller::Auth=HASH(0x1b66f90)', 'TestLDAP=HASH
(0x1bdf4cc)')
called at /Library/Perl/5.8.6/Catalyst/Action.pm line 32

Catalyst::Action::__ANON__('TestLDAP::Controller::Auth=HASH
(0x1b66f90)',
'TestLDAP=HASH(0x1bdf4cc)') called at /Library/Perl/5.8.6/
Catalyst.pm line
1187
        eval {...} called at /Library/Perl/5.8.6/Catalyst.pm line 1187
        Catalyst::execute('TestLDAP=HASH(0x1bdf4cc)',
'TestLDAP::Controller::Auth', 'Catalyst::Action=HASH(0x1bb230c)')
called at
/Library/Perl/5.8.6/Catalyst/Action.pm line 42
        Catalyst::Action::dispatch('Catalyst::Action=HASH(0x1bb230c)',
'TestLDAP=HASH(0x1bdf4cc)') called at /Library/Perl/5.8.6
/Catalyst/Dispatcher.pm line 177

Catalyst::Dispatcher::forward('Catalyst::Dispatcher=HASH(0x1a79c10)',
'TestLDAP=HASH(0x1bdf4cc)', '_ACTION') called at /Library/Perl/5.8.6
/Catalyst.pm line 300
        Catalyst::forward('TestLDAP=HASH(0x1bdf4cc)', '_ACTION')
called at
/Library/Perl/5.8.6/Catalyst/Controller.pm line 48

Catalyst::Controller::_DISPATCH('TestLDAP::Controller::Auth=HASH
(0x1b66f90)',
 'TestLDAP=HASH(0x1bdf4cc)') called at /Library/Perl/5.8.6
/Catalyst/Action.pm line 47
        Catalyst::Action::execute('Catalyst::Action=HASH(0x2d42dfc)',
'TestLDAP::Controller::Auth=HASH(0x1b66f90)', 'TestLDAP=HASH
(0x1bdf4cc)')
called at /Library/Perl/5.8.6/Catalyst/Action.pm line 32

Catalyst::Action::__ANON__('TestLDAP::Controller::Auth=HASH
(0x1b66f90)',
'TestLDAP=HASH(0x1bdf4cc)') called at /Library/Perl/5.8.6/
Catalyst.pm line
1187
        eval {...} called at /Library/Perl/5.8.6/Catalyst.pm line 1187
        Catalyst::execute('TestLDAP=HASH(0x1bdf4cc)',
'TestLDAP::Controller::Auth', 'Catalyst::Action=HASH(0x2d42dfc)')
called at
/Library/Perl/5.8.6/Catalyst/Action.pm line 42
        Catalyst::Action::dispatch('Catalyst::Action=HASH(0x2d42dfc)',
'TestLDAP=HASH(0x1bdf4cc)') called at /Library/Perl/5.8.6
/Catalyst/Dispatcher.pm line 177

Catalyst::Dispatcher::forward('Catalyst::Dispatcher=HASH(0x1a79c10)',
'TestLDAP=HASH(0x1bdf4cc)', '/auth/_DISPATCH') called at
/Library/Perl/5.8.6/Catalyst.pm line 300
        Catalyst::forward('TestLDAP=HASH(0x1bdf4cc)', '/auth/
_DISPATCH')
called at /Library/Perl/5.8.6/Catalyst/Dispatcher.pm line 116

Catalyst::Dispatcher::dispatch('Catalyst::Dispatcher=HASH(0x1a79c10)',
'TestLDAP=HASH(0x1bdf4cc)') called at /Library/Perl/5.8.6/
Catalyst.pm line
1136
        Catalyst::dispatch('TestLDAP=HASH(0x1bdf4cc)') called at
/System/Library/Perl/5.8.6/NEXT.pm line 75
        NEXT::AUTOLOAD('TestLDAP=HASH(0x1bdf4cc)') called at
/Library/Perl/5.8.6/Catalyst/Plugin/Static/Simple.pm line 62

Catalyst::Plugin::Static::Simple::dispatch('TestLDAP=HASH(0x1bdf4cc)')
called at /Library/Perl/5.8.6/Catalyst.pm line 1496
        eval {...} called at /Library/Perl/5.8.6/Catalyst.pm line 1487
        Catalyst::handle_request('TestLDAP') called at /Library/
Perl/5.8.6
/Catalyst/Engine/HTTP.pm line 365

Catalyst::Engine::HTTP::_handler
('Catalyst::Engine::HTTP::Restarter=HASH(0x1a8d7e0)',
 'TestLDAP', 3000, 'POST', '/auth/login', 'HTTP/1.1') called at
/Library/Perl/5.8.6/Catalyst/Engine/HTTP.pm line 275

Catalyst::Engine::HTTP::run('Catalyst::Engine::HTTP::Restarter=HASH
(0x1a8d7e0)',
 'TestLDAP', 3000, 'undef', 'HASH(0x180c418)') called at
/System/Library/Perl/5.8.6/NEXT.pm line 75
        NEXT::AUTOLOAD('Catalyst::Engine::HTTP::Restarter=HASH
(0x1a8d7e0)',
'TestLDAP', 3000, 'undef', 'HASH(0x180c418)') called at /Library/
Perl/5.8.6
/Catalyst/Engine/HTTP/Restarter.pm line 69

Catalyst::Engine::HTTP::Restarter::run
('Catalyst::Engine::HTTP::Restarter=HASH(0x1a8d7e0)',
 'TestLDAP', 3000, 'undef', 'HASH(0x180c418)') called at
/Library/Perl/5.8.6/Catalyst.pm line 1800
        Catalyst::run('TestLDAP', 3000, 'undef', 'HASH(0x180c418)')
called
at ./testldap_server.pl line 55"


If I turn off debug things seem to play a little bit better -- the
line
that seems to be tossing the error is 141 in Credential/Password.pm:

$c->log->debug("Successfully authenticated user '$user'.")
          if $c->debug;

which leads be to believe that there is a bigger issue with passing
$user
around as an object vs string vs hash between these modules.

 Thanks!
Wade Stuart
Fallon Worldwide
P: 612.758.2660
C: 612.877.0385


_______________________________________________
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/

---
"Those who can make you believe absurdities can make you commit
atrocities." --Voltaire



_______________________________________________
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/

Reply via email to