[Catalyst] Can't locate Catalyst/Plugin/Authentication/Store/DBIC.pm

Michael Higgins linux at evolone.org
Tue Dec 18 02:07:19 GMT 2007


PANIC!!!

So, the gentoo overlay installation is altered like:

dev-perl/Catalyst-Authentication-Store-DBIx-Class
!dev-perl/Catalyst-Plugin-Authentication-Store-DBIx-Class
!dev-perl/Catalyst-Plugin-Authentication-Store-DBIC

Okay... no more 'Plugin' or 'DBIC' anymore, it seems.

Then I did find this:
http://cpan.uwinnipeg.ca/htdocs/Catalyst-Authentication-Store-DBIx-Class/Catalyst/Authentication/Store/DBIx/Class.html

And, I try to change a couple of items in the configs, like so:

authentication => {
                        default_realm => 'members',
                        realms => {
                            members => {
                                credential => {
                                    class => 'Password',
                                    password_field => 'password',
                                    password_type => 'clear'
                                },
                                store => {
                                    class => 'DBIx::Class',
                                    user_class => 'MyAppDB::Users',
                                    id_field => 'user_id',
                                    role_relation => 'userroles',
                                    role_field => 'role_name',
                                }

... to mimic what is in that doco.

Caught exception in BanTrace::Controller::Login->index "The user object
Catalyst::Authentication::Store::DBIx::Class::User=HASH(0x9469e70) does
not support any known password authentication mechanism.,,

...here:

   35:     if ($username && $password) {
   36: 
   37:         # Attempt to log the user in
   38:         if ($c->login($username, $password)) {

WTF????

My application is configured exactly like the tutorial... used to be
written?? No. It still looks like: Authentication::Store::DBIC

And that Plugin:: isn't part of the installation now... this _can't_ be
okay, no?

Alright, so this is the new 'login' method, 'authenticate'?

   37:         # Attempt to log the user in
   38:         # if ($c->login($username, $password)) {
   39:         if ($c->authenticate($username, $password)) {


Caught exception in BanTrace::Controller::Login->index "authenticate
called with nonexistant realm: 'MYPASSWORD'?

Ouch! Oh, with a hashref, now:

        # if ($c->login($username, $password)) {
        if ($c->authenticate({username => $username, password =>
$password}))

So now I'm in... sort of. Other parts are broken...

if ($c->check_user_roles('admin')) {

... didn't seem to fly.

Now, I'm stuck. That method comes from, I think, ::DBIC ... what's the
new way? Fortunately, in this app, if you are not 'admin' you must be a
user... but I'd like to have my ROLE back!!!

Any help really, really appreciated. '-)

Cheers,

-- 
 |\  /|        |   |          ~ ~  
 | \/ |        |---|          `|` ?
 |    |ichael  |   |iggins    \^ /
 michael.higgins[at]evolone[dot]org



More information about the Catalyst mailing list