On Wednesday, November 2, 2011 2:36:53 PM UTC-4, haggis wrote:
>
> Hello, 
> is it possible to return json to the calling jQuery.ajax() function 
> after access was denied by decorator @auth.requires_login()? 
>
> I know there is a possibility to specify a function when authorization/ 
> authentication failed with 
> auth.settings.on_failed_authentication = myFunc and 
> auth.settings.on_failed_authorization = myFunc 
>
> I put this two lines in model db.py. However, I don't know how to just 
> return json containing a url to which the user should be redirected.
>

Maybe your on_failed_authorization function could do:

raise HTTP(200, 'your_url')

Anthony 

Reply via email to