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.

Catalyst::Authentication::Store::DBIx::Class uses the following example:

    if ($c->authenticate({
                          screen_name => $c->req->params->{'username'},
                          password => $c->req->params->{'password'},
                          status => [ 'registered', 'active', 'loggedin']
                         })) {

        # ... authenticated user code here
    }


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.

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:

id | status
1  | registered
2  | active
3  | loggedin
...

...and we store the status id in our user model...how would I handle the
authenticate method call?

Thanks,
Mike Peck
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to