[Zope3-Users] How do I automatically login a user
Jim Fulton
jim at zope.com
Tue Apr 1 12:50:54 EDT 2008
On Apr 1, 2008, at 12:33 PM, kevin gill wrote:
> During my registration process I want to automatically login the
> user (in
> Zope3).
>
> I can see how to programatically logout a user using
> ILogout().logout(request), but I don't see an equivalent for logging
> in.
>
> I intend to use session cookies for tracking users.
The most straightforward way is to interact with the session-
credentials extractor directly to get it to save credentials for you.
Unfortunately, the session-credentials extractor doesn't provide an
API to do this. This would be a worthy addition. We have an internal
session-credential extractor that does this. I don't have time to
work this into the version in zope.app.authentication, but if someone
wants to work on this, I'd be happy to check my code into the sandbox
for someone to work from. Note that it also stores sha-encoded
credentials. The current credentials extractor stores plain-text
passwords in the session data which is extremely lame.
Jim
--
Jim Fulton
Zope Corporation
More information about the Zope3-users
mailing list