[Zope] Programmatically authenticating users?

Alec Munro alecmunro at gmail.com
Fri Aug 13 19:31:41 EDT 2004


Hi List,

I have an application where I need to have a large number of users. I
don't want to override Zope's existing user authentication mechanism,
but I am trying to wrap it in my own code, to access additional
information about a user.
Here's what I want to do:
Present user with login form.
Pass username and password to Zope to authenticate.
If authenticated, retrieve additional information related to that user.

One part of this is I would like a user to become an authenticated
user as far as zope is concerned once they have logged in via my form.
This is the part I am having trouble with.
Right now, I simply pass authentication credentials to my
acl_users.authenticate method, passing None as the 'request' argument.
This seems to return either "None" or a user name, at least as far as
the print command is concerned.

I don't know a tremendous amount about how user authentication works
in Zope, but my assumption is that when you login, say by going to
/manage, it returns a cookie of some sort that marks you as
authenticated and contains an id to identify who you are authenticated
as. How would I provide this functionality in a script of my own
making?

Thanks for any help.

Alec Munro


More information about the Zope mailing list