repoze who misses password?

3 views
Skip to first unread message

Antti Niinikoski

unread,
Oct 13, 2008, 4:16:13 PM10/13/08
to TurboGears
Hi!

I'm trying to use repoze who with TG2. It works fine with the
authorize decorator and keeps track of the logged in user.

But my problem is:
It recognices the wrong usernames but for some reason if I type in a
correct username it allows me to type in whatever password and accepts
the authentication.

Am I missing something crucial?

I use the default identity database models for User, Group and
Permission and I have the latest "easy_install" of who. I followed
the instructions on http://blog.repoze.org/tgrepozewho.html and also
tried to modify things a bit with the instructions on pylons but
without success. http://wiki.pylonshq.com/display/pylonscookbook/Authentication+and+Authorization+with+%60repoze.who%60

Anyway thanks for the hard work done for this. It seems to be a good
successor for the TG1 identity.

Regards,

antti

Florent Aide

unread,
Oct 15, 2008, 1:50:53 PM10/15/08
to turbo...@googlegroups.com
On Mon, Oct 13, 2008 at 10:16 PM, Antti Niinikoski
<antti.ni...@gmail.com> wrote:
>
> Hi!
>
> I'm trying to use repoze who with TG2. It works fine with the
> authorize decorator and keeps track of the logged in user.
>
> But my problem is:
> It recognices the wrong usernames but for some reason if I type in a
> correct username it allows me to type in whatever password and accepts
> the authentication.
>
> Am I missing something crucial?

someone changed the model for identity and forgot to update the config
file to go with it. I need to do some real life stuff and I'll commit
a fix later tonight ...

Florent.

Helio Pereira

unread,
Oct 16, 2008, 5:19:24 AM10/16/08
to TurboGears
well, now works fine but identity.py needs to import sha and md5.


On 15 Out, 18:50, "Florent Aide" <florent.a...@gmail.com> wrote:
> On Mon, Oct 13, 2008 at 10:16 PM, Antti Niinikoski
>

Florent Aide

unread,
Oct 16, 2008, 5:45:56 AM10/16/08
to turbo...@googlegroups.com

Fixed yesterday night in the SVN...

Florent.

Helio Pereira

unread,
Oct 16, 2008, 7:20:14 AM10/16/08
to TurboGears
Not for "elixir". In "elixir" don't import sha and md5...



On 16 Out, 10:45, "Florent Aide" <florent.a...@gmail.com> wrote:

Florent Aide

unread,
Oct 16, 2008, 8:51:04 AM10/16/08
to turbo...@googlegroups.com
On Thu, Oct 16, 2008 at 1:20 PM, Helio Pereira
<helio.mc...@gmail.com> wrote:
>
> Not for "elixir". In "elixir" don't import sha and md5...
>
>

I was not answering your email sorry. I said I fixed the original
poster's problem in the SVN yesterday. As per the import errors I had
no such problems yesterday night but I still need to complete the
functionnal tests I intend to commit...

I don't use Elixir. I don't develop with Elixir. Elixir is not my
primary target, as such my first and foremost objective is to complete
a working identity support from framework to app with unit tests et
al. Once this is done I'll begin to look at Elixir support. And in
those quarters the buildbot nightly tests will help detect problems
that I won't see on the spot.

Florent.

Antti Niinikoski

unread,
Oct 16, 2008, 10:33:57 AM10/16/08
to TurboGears
Thanks Florent!

FYI: if someone wants to update the old identity model, here is what i
did to get it to work:

- added the get_encryption_method to the User as founded in a freshly
started project
- modified the validate_password method to be the same as in a freshly
started project

Thanks again
Antti

On 16 loka, 15:51, "Florent Aide" <florent.a...@gmail.com> wrote:
> On Thu, Oct 16, 2008 at 1:20 PM, Helio Pereira
>

Jorge Vargas

unread,
Oct 16, 2008, 1:44:04 PM10/16/08
to turbo...@googlegroups.com
On Thu, Oct 16, 2008 at 8:33 AM, Antti Niinikoski
<antti.ni...@gmail.com> wrote:
>
> Thanks Florent!
>
> FYI: if someone wants to update the old identity model, here is what i
> did to get it to work:
>
> - added the get_encryption_method to the User as founded in a freshly
> started project
> - modified the validate_password method to be the same as in a freshly
> started project
>
A patch will be nice. Also we need to provide this in the migration
from alpha5 to alpha6.

Jorge Vargas

unread,
Oct 16, 2008, 2:03:58 PM10/16/08
to turbo...@googlegroups.com
On Thu, Oct 16, 2008 at 11:44 AM, Jorge Vargas <jorge....@gmail.com> wrote:
> On Thu, Oct 16, 2008 at 8:33 AM, Antti Niinikoski
> <antti.ni...@gmail.com> wrote:
>>
>> Thanks Florent!
>>
>> FYI: if someone wants to update the old identity model, here is what i
>> did to get it to work:
>>
>> - added the get_encryption_method to the User as founded in a freshly
>> started project
>> - modified the validate_password method to be the same as in a freshly
>> started project
>>
> A patch will be nice. Also we need to provide this in the migration
> from alpha5 to alpha6.
>
this is the changeset http://trac.turbogears.org/changeset/5540
I currently don't have a trunk install of TG2 but the following will
generate a proper patch to be applied to older projects
quickstart with >5539
quickstart with 5540
copy both files to the same folder (with a different name of course)
then run diff file1 file2 > fix_trunk_model.patch
this way you will create a non-directory patch which is useless for
other cases but in this one people will just have to:
cd into model dir
patch -p0 < fix_trunk_model.patch

and it will fix all broken models, that is of course if you haven't
changed your identity code.

Reply all
Reply to author
Forward
0 new messages