Hi all, in my Grails app I have a couple of simple security filters (please note it's just a prototype, not a commercial app:
securityCheckFilter(controller:'overview', invert:true) {
before = {
if(!session?.gaSession?.gaUser) {
flash.message = "You are not authorised to see this page. Please login."
redirect(controller:'overview',action:'login')
return false
}
return true
}
}
Which means that, apart from the controller 'overview' that handles the login/registration, all the other controllers require authentication. The problem is that I'd like to implement this typical flow:
(1) user tries protected url (2) redirection to login (3) successful login (4) redirection to url
In my code it works until point 3, but I'm missing 4.
Any hints?