I’m making my first web app (python+webpy+mongodb). What’s the best way to make authentication module? Should I save login to cookies, or just keep login/pass in variables? Do i have to make every ‘restricted’ function check user’s rights every time it works? Maybe there are any good articles about these things?
I’m making my first web app (python+webpy+mongodb). What’s the best way to make authentication
Share
Here’s a good guide with explanations: Form Based Authentication For Websites.
web.py has a recipe for basic authentication which can be extended using these techniques.
Usually you use a persistence mechanism known as sessions to track authenticated users. Have a look at Beaker to see how it can be implemented.