Sanjay ha scritto:
> As I understand from the commented documentation in app.cfg (see
> below), if I assign a text password to any user object like this:
>
> u.password = 'clear text'
>   

No.. as you can see in test_identity.py, the password content is meant 
to be already encrypted.

    def test_user_password_hashed_md5(self):
        "Test if a md5 hashed password is stored in the database."
        config.update({'identity.soprovider.encryption_algorithm':'md5'})
        # force new config values to load
        startup.startTurboGears()
        testutil.create_request('/')
        hub.begin()
        u = TG_User.by_user_name('samIam')
        u.password = 'password'
        u.sync()
        assert u.password =='5f4dcc3b5aa765d61d8327deb882cf99'
        hub.rollback()
        hub.end()


The encryption_algorithm option is used in saprovider.py, soprovider.py, 
for decrypting only.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to