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

Daniel McBrearty danielmcbrearty at gmail.com
Wed Dec 13 00:04:30 GMT 2006


or maybe it's even simpler ... it looks like
C::P::A::Password::_check_password tries all methods until it
succeeds, depending on User::supports ... so I guess that saying
"$user::supports( qw/crypted hashed/) somewhere should do it?

sorry for clogging up the list with my ramblings ... perhaps I should
have dug into the sauce first ...

On 12/13/06, Daniel McBrearty <danielmcbrearty at gmail.com> wrote:
> 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
>


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



More information about the Catalyst mailing list