I have a question regarding authentication using Catalyst::Authentication::Store::DBIx::Class, that I'm sure someone here can answer. Please excuse me, as I am a complete catalyst and DBIx::Class n00b.<br><br>Catalyst::Authentication::Store::DBIx::Class uses the following example:<br>
<br><pre> if ($c->authenticate({ <br> screen_name => $c->req->params->{'username'},<br> password => $c->req->params->{'password'},<br>
status => [ 'registered', 'active', 'loggedin']<br> })) {<br><br> # ... authenticated user code here<br> }</pre><br>In this example, if the entered username and password match AND the status column matches one of the specified values: 'registered', 'active', or 'loggedin', then the user is authenticated.<br>
<br>I prefer to have a list of valid statuses, and a more normalized
database. What if, in the database, we have a table of statuses, such as:<br><br>id | status<br>1 | registered<br>2 | active<br>3 | loggedin<br>...<br><br>...and we store the status id in our user model...how would I handle the authenticate method call?<br>
<br>Thanks,<br>Mike Peck<br><br>