FAQ
Howdy all,

I'm quite perplexed about some behavior from Plugin::Authentication.
I'm trying to get a Catalyst app running on a new machine, but
Authentication isn't reading any realms from my config. The config
file is definitely getting read otherwise, and I can see my
authentication realms definition sitting there in the "Config" session
of Catalyst's in-browser error screen while I'm trying to debug this,
but as far as I can tell the Auth module just isn't reading it.

I'm debugging with this line:

use Data::Dumper; die Dumper ( $c->auth_realms );

On the original machine, this prints a nice, full hashref containing
all my realms info. On the new machine, this prints {}. So, the
Authentication plugin is loading (and giving $c the auth_realms
method), but it's not reading my config at all, apparently.

This is the config I'm feeding it (exact same code in both machines):

__PACKAGE__->config->{'Plugin::Authentication'} =
{
default_realm => 'members',
members => {
credential => {
class => 'Password',
password_field => 'password',
password_type => 'clear',
},
store => {
class => 'DBIx::Class',
user_class => 'NEADB::User',
id_field => 'id',
}
}
};

Even if I paste in the example config from Plugin::Authentication's
man page, the return value of $c->auth_realms is still an empty
hashref.

As far as I can tell, the version numbers of all modules involved
match. (Using latest CPAN or Debian versions of all modules.)

Any advice as to where to look next would be enormously appreciated.

--
Jason McIntosh
Appleseed Software Consulting
http://appleseed-sc.com

Email: [email protected]
Jabber: [email protected]
AIM: zendonut
Cell: 617-792-3829

Search Discussions

  • Tomas Doran at Jun 5, 2009 at 10:56 am

    Jason McIntosh wrote:
    As far as I can tell, the version numbers of all modules involved
    match. (Using latest CPAN or Debian versions of all modules.)

    Any advice as to where to look next would be enormously appreciated.
    My only real suggestion is to throw some dumping / debugging into the
    _authentication_initialize routine of Catalyst/Plugin/Authentication.pm

    to work out how/why it isn't finding your realms hash..

    Also, does the config printed in the debug screen match what you expect
    for auth config, or does it look incorrect in any way?

    Cheers
    t0m
  • Jason McIntosh at Jun 5, 2009 at 2:11 pm
    On Fri, Jun 5, 2009 at 6:56 AM, Tomas Doranwrote:
    My only real suggestion is to throw some dumping / debugging into the
    _authentication_initialize routine of Catalyst/Plugin/Authentication.pm
    to work out how/why it isn't finding your realms hash..
    Thank you, this was the nudge I needed.

    My problem was that the call to setup() had somehow wandered too high
    up in my application's main module code, so that it was getting called
    too early. No idea _how_ that happened, but it all makes sense from
    there.

    --
    Jason McIntosh
    Appleseed Software Consulting
    http://appleseed-sc.com

    Email: [email protected]
    Jabber: [email protected]
    AIM: zendonut
    Cell: 617-792-3829

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJun 5, '09 at 3:26a
activeJun 5, '09 at 2:11p
posts3
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Jason McIntosh: 2 posts Tomas Doran: 1 post

People

Translate

site design / logo © 2023 Grokbase