Simple Authentication Authenticator in Python + Pylons

I would like to write a simple decorator so that I can put above functions in my controller to check for authentication and redirect to the login page if the current user is not authenticated. What's the best way to do this? Where should the decorator go? How do I pass information about cookies to a decorator? The sample code is much appreciated.

Thanks!

+2


a source to share


1 answer


Another approach for pylons authorization (based on decorators, repoze.what)

How do I pass cookie information to a decorator?



Use global request object and get cookie or use wsgi environment of request

+2


a source







All Articles