On 1/21/06, Simon Belak <[EMAIL PROTECTED]> wrote: > > Can I just sneak some generic functions into Identity than? ;) > > What I would like is to have more flexibility when it comes to > authentication failure. Therefore I propose adding function fail() > defined as: > > @generic() > def fail(func, errors=None): > pass > > @fail.when(strategy.default) > def _default_redirect(func, errors): > raise cherrypy.InternalRedirect( > current_provider.url_for_identity_failure()) > > Predominantly it would get called from require(), but of curse it could > be triggered manually as well.
I think Jeff's solution of passing in a callable is fine. And, if you really need to do some wild and crazy things, you can pass in a generic callable :) Kevin

