Is there any way to have two login pages (in grails) that each one redirects to a specified default url?
admin/login -> redirect to /admin/dashboard
user/login -> redirect to /user/dashboard
Thanks!
Is there any way to have two login pages (in grails) that each one redirects to a specified default url?
admin/login -> redirect to /admin/dashboard
user/login -> redirect to /user/dashboard
Thanks!
This answer on Stack Overflow should help. It may not provide the exact answer you are looking for, but it should give you enough information to get what you need.
Thanks Rob, I've found a similar solution in Grails user list, but the real problem is that I need two different login pages, the layout and some rules are different from each one.
Since Spring 3.1 you can have multiple <http/> elements. Here you can define different form-login elements for different patterns.
You can create an AuthenticationEntryPoint that will send the user to two different login pages based upon your given rules.