Right, let me be fully disclosed up front that this question is out there. I recently inherited a codebase built on Tornado. Why am I posting here? Well, authorization is a major requirement for my current project. I need to avoid writing all of it myself. There's a lot of logic around groups, roles, etc. Ok, Why am I posting here and not over on the Tornado group? Well, AuthKit seems to be extensively used with Pylons. So here goes:
The app I inherited makes extensive use of the Aysnc features provided by Tornado. I can run Tornado as a WSGI app, but I can't have async with it. My two choices for authorization seem to be AuthKit or Repoze.what. I'm leaning towards AuthKit at the moment. I'd like to use Tornado's authentication. Still with me? Specifically what I want to do is use decorators to authorize my controller actions. Tornado, controllers, what?!? Well, I wrote my own RESTful routing layer and RESTFul controllers. Basically, the Handler imports a module and calls the appropriate method based on the URL, passing the request object and the parsed URL as a dictionary. Also, I get a current_user method as part of the Tornado Authentication. That seems to map to environ[REMOTE_USER]. So please allow me to get to my question. I've been poring over the AuthKit source. It seems like I should be able to leverage it somehow. Can anyone give me any advice on how I might either: 1. Fork AuthKit to make a version that doesn't rely on WSGI. I've already got the request object where and when I need it, after all. I can also easily check for an authenticated user. 2. Create a Double of some kind to fool AuthKit into thinking I've got a WSGI app. Please be gentle here, people. None of this was my idea. I inherited this beast -- it's not like they asked me first. Thanks! Paul -- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en.
