[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 (
$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
More information about the Catalyst
mailing list