Jorge Vargas wrote:
> I don't know why I though he wanted to implement a provider.

The problem I have right now is that the IdentityFailure exception,
thrown when an access control check fails, always redirects to the
identity.failure_url form. I don't want to do that, necessarily: For
those controllers which will be called by programmatically generated
HTTP requests (as opposed to ones from a browser with an actual
end-user behind them), I want to return a HTTP 401 (Authentication
Required) to the client in place of a form redirection.

That said, IdentityFailure is raised by a bunch of different Identity
code, and I'm not sure how to modify its behavior to depend on the
properties of the associated controller -- for that matter, I don't
even see a way to even get a reference to the controller from the
exception being thrown without grabbing the stack frame out of the
Python and doing some exceedingly ugly stuff. And if I *did* know how
to do that, I'd have to figure out how to make IdentityFailure act as a
cherrypy.HTTPError rather than a cherrypy.InternalRedirect based on the
properties of the controller being executed when the exception was
thrown.

All of it's doable through brute force and introspection, but figuring
out a way that isn't ugly as sin (and thus which might be liable for
inclusion upstream) may be interesting.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to