Gavin, Assuming you are using the Authentication plugin, you can define multiple realm objects, each of which allows you to specify the columns to be used for username and password. The documentation is pretty good on this one, and it's working well for me.
http://search.cpan.org/~bobtfish/Catalyst-Plugin-Authentication-0.10020/lib/Catalyst/Plugin/Authentication.pm#CONFIGURATION Does that help? -Tim On Thu, Jun 28, 2012 at 3:09 PM, Gavin Henry <gavin.he...@gmail.com> wrote: > 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 ( > $c->authenticate( > { > username => $username, > password => $password > }, > 'progressive_test' > ) > ) > { > > 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: > > <customers> > <credential> > class Password > password_type clear > username_field useralias > password_field uipass > </credential> > <store> > class DBIx::Class > user_model CustomerDB::Account > </store> > </customers> > > Ideas? > > -- > http://www.suretecsystems.com/services/openldap/ > http://www.surevoip.co.uk/api > > _______________________________________________ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: > http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ > Dev site: http://dev.catalyst.perl.org/ >
_______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/