As I promised someone on IRC a while ago, here's[1] an example of
OpenID support in a werkzeug application using the python-openid[2]
library.
you can ignore the custom expose thing I have - it's a playing ground
of mine.
I hope it's clear how things work wrt publishing objects and mapping
them?
for ex.
@expose('/openid')
class form:
def GET(self, req):
on a GET request to the /openid url, an instance is created of the
form class and the GET method is called with a werkzeug Request
instance as an argument. For POST requests the POST method is called.
(and class decorators are a Python 2.6 feature only).
Now wrt openid, I don't understand why they need a "store" for the
Consumer but it seems it works without one too [ second argument none
in OID_CONSUMER = consumer.Consumer(session, None) ]
The "session" object is a beaker session in my case, but I didn't see
how the Consumer uses it too, or if it even uses it... needs more
investigation.
[1] http://paste.pocoo.org/show/130583/
[2] http://openidenabled.com/python-openid/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pocoo-libs?hl=en
-~----------~----~----~----~------~----~------~--~---