Hello.

 In the pyramid.authentication.SessionAuthenticationPolicy (or
 AuthTktAuthenticationPolicy) class description there is constructor
 argument ``callback``. One of ``callback`` arguments is `userid`.

 What exactly `userid` is? As I've found from the sources, it's a value
 that passed to pyramid.security.remember, but in that method argument
 is named "principal".

 Moreover, I can pass to pyramid.security.remember not string but
 object (sqlalchemy model for example) and everything is working just
 fine (stored in the session).

 So maybe developers should rename "userid" to "principal"?

 And another question. What's the recommended way to store sqlalchemy
 model instance in the session that represents current user? I don't
 want to query database every HTTP request to obtain "user" object by
 it's uid stored as ``principal`` value.

 --
Sergei Stolyarov

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

Reply via email to