I am adding authentication to my Catalyst application. The app is a port from another system, so I must use the current backoffice for some things.
One of those things is the users database. Its not SQL and I must access it trough web services.
Following docs now I have it working using hashes for user/password, as in the example. I also tested the Catalyst tutorial using DBIx.
But now I need to plug my own model to check and retrieve the user from the real backoffice.
Where?
From the controller I call the auth plugin
$c->authenticate({ username => $username, password => $password }
And in the config I have (from the tutorial)
__PACKAGE__->config('Plugin::Authentication' => {
default_realm => 'members',
realms => {
members => {
credential => {
class => 'Password',
password_field => 'password',
password_type => 'clear'
},
store => {
class => 'DBIx::Class',
user_model => 'MyApp::User',
role_relation => 'roles',
role_field => 'rolename',
}
}
}
});
So where can I call my web services model?
Thank you in advance.
UPDATE: To survive the week I maed my own webservices query. If the result is OK I pass the obtained data to this hardcoded realm. Very, very, very ugly, but I delivered the functionality. Now I am serious again.