user authentication interface in python
Gerhard Häring
gh at ghaering.de
Fri Jun 13 09:56:29 EDT 2003
scn wrote:
> hello. does anyone have a high-level example of how to implement
> 'secure' user authentication interface for web users in python.
>
> i am in the process of designing a simple web application that
> requires user authentication and i remembered that php typically held
> system authentication information in a separate file and included this
> file in the main interface script.
What's the advantage of this approach? The only pro I see is that if you
misconfigure your webserver so the .php file is rendered as-is without
processing through PHP the user won't see the password.
> is there a similar convention or methodology in python for
> accomplishing the same idea? [...]
Sure, you can
a) import a module from elsewhere
or
b) open the file using file("/path/to/file") and read it
I still don't see why you'd want to store user information like this.
FWIW, I typically do authentication either using Apache directly or
store login and password in a PostgreSQL database.
More information about the Python-list
mailing list