Hi,
I got the following situation:
I'm running a couple of other apps as wsgi callables, they follow the
"object" dispatcher protocol of wsgi, that is a class that extends
BaseController which as a __call__ method that in turns call the wsgi
app with the environ and start_reponse. it's all running well. Now I
want to wrap everything under pylons auth, to have one user/pass combo
for everything. So I created a SecureController which has the
following:
class SecureController(BaseController):
def __before__(self):
if not c.current_user:
abort(401)
And I got a middleware to catch that 401, which is working great for
all non-wsgi calls (ie: "normal" pylons controllers)
therefore I see that the problem is that when I'm returning the app
from my custom __call__ method it's not calling
WSGIController.__call__(self, environ, start_response) as
BaseController does which is not executing the __before__ call. of
course if I change the return value of my __call__ method to the
WSGIController callable auth works, so this is definitely the problem.
So my question is how can I return my own wsgi app from the call
method and yet call pylons to execute the authentication?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---