Hi Michael, Unfortunately the Tutorial is a bit out of date.
Please look at this: http://search.cpan.org/~jayk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication.pm and this: http://search.cpan.org/~jayk/Catalyst-Authentication-Store-DBIx-Class/lib/Catalyst/Authentication/Store/DBIx/Class.pm and your issues should be cleared up. Jay On Dec 17, 2007, at 7:07 PM, Michael Higgins wrote:
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 _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/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.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
