[Zope] Changing CookieCrumbler

Inline: F. Zorge zorge@inline-info.nl
Fri, 12 Apr 2002 10:41:29 +0200


Hi,
I am trying to improve cookiecrumbler (version 0.3) to meet my needs.
But I am no Python expert, so I wonder if someone is able to assist me a
bit.
This is the case:
- I want cookiecrumbler to put the username as well as the password into
a cookie.
- If the cookie is read later, the user is authenticated (with username
and password) and logged in without using the login form that comes with
cookiecrumbler
- If the cookie is not present (or contains a not authenticated user)
then cookiecrumbler's login form is presented to the user.
Now I looked at the python source of cookiecrumbler and there is a
comment saying that only the username is saved in a cookie, so I added
the following line to the source:

resp.setCookie(self.pw_cookie, pw, path='/',
        expires=expires)

below the setCookie for the username.
But now Cookiecrumbler just give me the password instead of the username
in de loginform. 
What do I have to add to the source tot let cookiecrumbler puts username
and password into the cookie and read username and password from the
cookie to login and authenticate and leave the loginform alone?

Thanks in advance

Frank Zorge

Inline informatisering & consultancy
Witte Rozenstraat 48
2311 XX Leiden
Telefoon 071 5133577
Fax 071 5121366
Email algemeen info@inline-info.nl
Email specifiek zorge@inline-info.nl 
Website www.inline-info.nl