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

Julien Sobrier julien at sobrier.net
Fri Mar 26 03:52:58 GMT 2010


Actually, I found the reason:  password_type   => 'self_check',

To fix my issue, I added a second real with password_type   => 'clear',



__PACKAGE__->config->{'Plugin::Authentication'} = {
	default => {
	    class           => 'SimpleDB',
	    user_model      => 'DB::User',
	    password_type   => 'self_check',
	},
	free => {
	    class           => 'SimpleDB',
	    user_model      => 'DB::User',
	    password_type   => 'clear',
	},
};


There might be a better way to do it.

Julien

On Thu, Mar 25, 2010 at 8:16 PM, Julien Sobrier <julien at sobrier.net> wrote:
> 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