cgi login/password question

Michal Wallace sabren at
Thu Feb 10 01:33:07 EST 2000

sp00fD wrote in message <87sdag$ou7$1 at>...
>I'm thinking about adding a login method to a web-site, I'd like to
>roll it myself, but how would I pass the info from page to page?
>Obviously a page would have a login/password form, and I'd like to have
>that username correspond to a permissions bit so that certain people
>can do certain things.  I pretty much have it worked out except for the
>matter of passing the info around.  Can someone help me?  I like how
>the builtin method for doing this sets the "REMOTE-USER" environment
>setting.  If it was passed in the url, it could easily be changed, as
>could a cookie.

Hey Mike,

What you want is called session handling... the basic idea is
that you "brand" the browser with a unique key in a cookie or
encoded in all of your URLs... Then you store variables tied
to that session in some sort of persistent namespace or
dictionary or whatever... One of the variables can be the

by storing authentication info in a session, you can log the
user in and out at will..

I've yet to see a really useful version of session handling in
python... but I've been toying with the idea of porting the
PHPLIB session/authentication/permission library over
at ... Would anyone else be
interested in helping out?


More information about the Python-list mailing list