cgi authentication

Richard van de Stadt stadt at cs.utwente.nl
Wed Sep 22 04:15:43 EDT 1999


"Magnus L. Hetland" wrote:
> 
> "Dan Grassi" <Dan at Grassi.com> writes:
> 
> > I need to do authentication from Python, for various reasons using Apache
> > and .htaccess is not a workable solution.  I can get the request to show up
> > with the following code but I can not figure out how to access the returned
> > name/password pair.  Yes, I have looked hard for the info on the web and in
> > the books. "-)
> 
> Well - I have had the same problem, and AFAIK, Apache refuses to give
> you the password (ostensibly for security reasons...) There is a
> patched version available somewhere...
> 
> >
> > Can anyone help?
> >
> 
> --
> 
>   Magnus
>   Lie                                     Please forward all spam to
>   Hetland                                                uce at ftc.org

If all else fails, then you'll have to do it yourself, by simply using:

<html><head></head>
<body>
<form method="post" action="SomeScript" enctype="multipart/form-data">
Login: <input value="" size="30" name="login">
Password: <input value="" type="password" size="30" name="password">
<input type="submit" value="go!">
</form>
</body>
</html>

Then in SomeScript you can work with the variables 'login' and
'password'. I guess you must have thought of this. But one
never knows :-) 

But you'll have to make your own (encrypted?) password file
for this to work (or get the source of htpasswd to find out
how passwords are encrypted for use with .htaccess).

Richard.




More information about the Python-list mailing list