WebOid
A library for implementing an OpenID consumer in a web.py environment.
Code, bug tracking, etc. at https://code.launchpad.net/~weboids/webpy/weboid.
Oct 2, 2007
bugs galore with the beaker version. maybe something I misunderstood :(
At the moment, you shoul pull revision 4 if you want something working
Anyway, plans are to use Karol's session package, and make the whole thing 3.0 style. Stay tuned
Functionality
User can explicitly login with OpenID, and the page methods can check this explicitly as well, but you can use the decorator @weboid.checkaccess() on a GET or POST method to make sure the user is logged in before executing the method.
You can also use @weboid.checkaccess(f) where f(userid,path) (also called "access control" or ACL function) should return a boolean whether access to path is allowed for userid.
If you know you use f() at a specific page or group of pages with the same ACL policy, f() can ignore path (this is what we do at the example app.py), but sometimes it's handy to have a single ACL function and handle the whole policy in one place
If user is not logged in, or doesn't have access, an OpenID login screen with a relevant message is displayed, user logs in, ACL is checked, etc. as expected (unless there's a bug)
Many options are configurable at conf.py (fcgi/standalone, reload, debug, etc.)
Note about templating language
At the moment, weboid.py uses Genshi for templating, but to do a compatible webpyview you'd only need to rewrite <30 lines (including comments). You'll need to redo the html templates as well ;)