[Catalyst] Using Progressive realms when username and password fields are all different

Gavin Henry gavin.henry at gmail.com
Thu Jun 28 20:09:52 GMT 2012

Hi all,

I have three realms; customers, resellers and admins. Each auth table
in these realms is not consistent and uses different username_filed
and password_field names. I can't change this.

Now the normal way is to do:

if (
                         username => $username,
                         password => $password

This fails as no realms have username and password as the actual
column names. I wanted DWIM here so when I pass in username the auth
framework actually uses what I've set in my config using
username_field and password_field like so:

                class Password
                password_type clear
                username_field useralias
                password_field uipass
                class DBIx::Class
                user_model CustomerDB::Account



More information about the Catalyst mailing list