Grails Spring Security plugin: Getting 302 for Ajax Request for timedout Session -


we using spring security plugin version 1.2.7.3 grails 2.2.1. in config.groovy do:

grails.plugins.springsecurity.auth.ajaxloginformurl = "/mylogin/authajax" 

thinking that, when there ajax request, spring security invoke authajax() in mylogincontroller if user's httpsession has timed out.

as per doc, ensure header x-requested-with value xmlhttprequest in ajax request plugin knows ajax request.

my expectation authajax() invoked , can make return 401, ui knows needs pop login screen.

however, instead, of authajax() getting invoked, 302 returned ui location field set http://localhost:8080/myapplication/mycontroller/authajax

this means i'll have put in hackey on ui. check 302 , check location field , make user re-login. prefer have 401 returned.

any ideas doing wrong?

thanks million


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -