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.methering...@intechnology.com ] [ - Comments in this message are my own and not ITO opinion/policy - ] _______________________________________________ List: Catalyst@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/