[Catalyst] What is correct way to re-check user password for authenticated user?

Oleg Kostyuk cub.uanic at gmail.com
Tue Aug 25 23:22:32 GMT 2009


Hello subscribers,

On some pages I need to re-check user password (to be more concrete -
each time when user change any settings on "user settings" page). I
can't compare passwords directly (something like: $form->{password} eq
$c->user->password()), because in DB I have only hashed passwords.
Seems that I can try to authenticate user again, by calling
$c->authenticate(name=>$c->user->name, pass=>$form->{password}), but I
concerned is this acceptable - calling authenticate, when user is
already authenticated. And what will be if provided password is
incorrect - user will be auto-logout'ed or not?

May be there is some other way, that is not obvious to me?

Any thoughts is welcome,
Thanks.

-- 
Sincerely yours,
Oleg Kostyuk (CUB-UANIC)



More information about the Catalyst mailing list