2005 - 07 - 27

WSGI Auth

The first project I am planning to release is a generic WSGI authentication middleware. The idea is that you'll have a class that you pass a callable for the templates to use and a callable for verifying a username and password pair. Then the middleware will take all of that together and create a authentication interface.

To let the middleware to know it needs to authenticate the page, the application just has to return a 403 status. I currently have it finding the status code and messing with the headers but the authentication isn't there yet.

This project is a small part of yet another application I am working on. I need to protect one specific page from a application but I couldn't find any WSGI authentication that worked in such a general way. The idea is that you could start with a single username and password pair, migrate to a dictionary, and then move up to a SQLObject setup easily. Or you could completely change the templates without affecting anything else about the authentication. I'm also trying to make it a single file that a person would have to put into thier code since all the other ones I found required a huge library along with it. I like small code snippets to huge libraries.

The most helpful thing I've found for making the middleware is 0xDECAFBAD's XSLT Filter. It's a single class that implements everything for a piece of middleware and the class is designed very cleanly into the different sections for initalization, pass through, and the actual filter part.

TC Out

[Permalink | Tags: [t], [t], [t]]
Calendar
July 2005 >
SuMoTuWeThFrSa
      1 2
3 4 5 6 7 8 9
10111213141516
17181920212223
24252627282930
31      
Hosted By:
Gushi Systems