[Catalyst] Supporting multiple password types with C::P::Auth::Store::DBIC

Daniel McBrearty danielmcbrearty at gmail.com
Tue Dec 12 23:49:48 GMT 2006


or reading C::P::Auth docs, maybe it's better to write a helper _login
method in my controller, and let that handle things ...

On 12/13/06, Daniel McBrearty <danielmcbrearty at gmail.com> wrote:
> Am migrating from an old system which used Basic Auth, to this plugin.
> As mentioned in a previous post, using
>
> password_type => crypted
>
> means that the old passwords still work. Nice ...
>
> But reading the docs for "crypt" I just noticed that it can screw up
> on unicode wide chars, so it looks like a good idea to migrate away
> from crypt to hashed. The best way to do this would be to make the
> plugin support both ... something like :
>
> if (length($user->password) == 14) {
>    # use crypt
> } else {
>    # use hash
> }
>
> and just hash new passwords.
>
> I hope this shouldn't too hard, if I know where to start ... I guess I
> need to subclass the class that does the actual decode. Any pointers
> or big gotchas that anyone can see?
>
> thanks
>
> Daniel
>
> --
> Daniel McBrearty
> email : danielmcbrearty at gmail.com
> www.engoi.com : the multi - language vocab trainer
> BTW : 0873928131
>


-- 
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131



More information about the Catalyst mailing list