[Catalyst] Plugin::Authentication apparently not reading config

Jason McIntosh jmac at jmac.org
Fri Jun 5 03:26:39 GMT 2009


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:  jmac at appleseed-sc.com
Jabber: jmac at appleseed-sc.com
AIM:    zendonut
Cell:   617-792-3829



More information about the Catalyst mailing list