> Repoze "who" is for authentication, "what" for authorization.

Thanks Christoph!

> The relevant docu is here:http://turbogears.org/2.1/docs/main/Auth/

That's very informative, but I can't find any reference to doing my
own creation of the user session.  I found a post by Sean about a year
ago, he was guessing:

        if user and password and user.password ==
identity.encrypt_password(password):
                """Associate given user with current visit &
identity."""
                visit_key = visit.current().key
                user_identity =
identity.current_provider.load_identity (visit_key)
                identity.set_current_identity(user_identity)
                return dict(retcode=0, status="Successfully logged in
as %s" % user.user_name)
        return dict(retcode=1, status="Incorrect user/password.")

Is this a valid way to handle authentication?  What's the _right_ way
to do it?


-- 
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