[Catalyst] How to extend authentication to use other DB fields?

Julien Sobrier julien at sobrier.net
Fri Mar 26 03:16:42 GMT 2010


Hello,
I am not really sure what you mean. I have tried this, but
authentication always fails:

$c->authenticate({ facebook_id => $uid, active => 1 })

I have triple checked that the parameters are correct, and the user
exists in the database.


On Wed, Mar 24, 2010 at 10:59 PM, Evan Carroll <lists at evancarroll.com> wrote:
>> I would like to extend my autentication to accept other fields:
>> with $c->authenticate({ fileld1 => [..], field2 => [...], fieldd => [...] });
>
> ...
>
>> Do I have to create my own Catalyst::Authentication::Credential plugin?
>
> No, it already does that... per the docs:
>
>    The first, and most common, method is simple retrieval. As its
> name implies simple
>    retrieval allows you to simply to provide the column => value
> pairs that should be
>    used to locate the user in question. An example of this usage is below:
>
> --
> Evan Carroll
> System Lord of the Internets
>
> _______________________________________________
> List: Catalyst at 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/
>



More information about the Catalyst mailing list