On Tue, Nov 18, 2008 at 12:35 PM, Gustavo Narea <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> On Tuesday November 18, 2008 18:52:50 Jorge Vargas wrote:
>> yes I almost though I screwed up by providing a bad password but check this
>> out.
>>
>> I saw this line
>> 2008-11-18 11:18:03,889 no userid returned from
>> <tgext.authorization.quickstart.SQLAuthenticatorPlugin object at
>> 0x92c5e8c>: (None)
>>
>> this is the chunk of my createdb.py
>>
>> tony = model.User()
>> tony.user_name = 'tony'
>> tony.password = 'tony'
>> tony.display_name = 'Anthony'
>> tony.email_address = '[EMAIL PROTECTED]'
>> print "Encryption method" , tony.get_encryption_method()
>> print "Validate_password =" ,tony.validate_password('tony')
>>
>> when it runs you can see.
>> Encryption method None
>> Validate_password = True
>
> Hmmm, then that confirms that this issue is specific to repoze.who (it's
> independent of its integration in TG) - there's something in your application
> that doesn't play nice with repoze.who.
>
not entirely see below.
>> I tried adding a statement to be shown in WHO_LOG hook, but I couldn't
>> I tried import sys; sys.stdout.write, plain print and even logging but
>> I didn't saw any so I wasn't sure, how can I "log to who_log??
>
> I can't remember how, but if it's not documented, you'll find the answer in
> repoze.who's PluggableAuthenticationMiddleware class.
>
according to mcdonc #repoze even print statements should go in there.
I'm not entirely sure why they aren't getting picked up, maybe that
is/was the bug, see below. Code never got called.
>
>> now looking at the code in
>> lib/python2.5/site-packages/tgext.authorization-0.9a1dev_r117-py2.5.egg/tge
>>xt/authorization/quickstart.py
>>
>> it seems that the above call user.validate_password('tony') should work
>
> Yes, it should. I can't find a single why it wouldn't work.
>
> Let's make another try before posting to the Repoze mailing list:
> 1.- Install repoze.what and repoze.what.plugins.sql.
> 2.- Do a bulk find & replace in your code to replace "tgext.authorization"
> with "repoze.what".
> 3.- Remove tgext.authorization (so that if there are still
> "tgext.authorization" imports, you'll know).
> 4.- Remove your devdata.db and recreate it with your script.
> 5.- Close all the open windows of your browser (to close the open sessions,
> if any).
>
> Then restart your application and try to login.
>
I took another stab at this today and updating to tg2trunk and
repoze.what as you suggested made things work.
So I guess we need tg2b2 fast :) Thanks for your help.
> Cheers.
> --
> Gustavo Narea <http://gustavonarea.net/>.
>
> Get rid of unethical constraints! Get freedomware:
> http://www.getgnulinux.org/
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---