[Catalyst] Change user password

Nigel Metheringham nigel.metheringham at dev.intechnology.co.uk
Tue Feb 2 08:54:00 GMT 2010


On 1 Feb 2010, at 21:09, Bogdan Lucaciu wrote:
> Considering you just want to check the password and not reauthenticate
> the user, using check_password is less overhead, saves you a trip to
> the database,  and it's probably cleaner.
> 
> Otherwise I doubt there's any side-efect in calling $c->authenticate
> directly, and the performance overhead is probably not important, as
> you would probably need to run this code quite rarely. And it's
> probably more readable for people not knowing the Authentication
> internals

Its worth pointing out that
http://search.cpan.org/perldoc?Catalyst::Plugin::Authentication::Internals
does not document the check_password method, and so those
implementing credentials may not implement it.

I'd go with $c->authenticate as it is a documented route into the
API and should be handled by all credential modules.

    Nigel.
--
[ Nigel Metheringham             Nigel.Metheringham at InTechnology.com ]
[ - Comments in this message are my own and not ITO opinion/policy - ]




More information about the Catalyst mailing list