How to get url parameters in grails spring security of user class UserDetailsServices?

I have two login pages, one for the user and one for the administrator. To find out who is trying to log in, I think he has a url template, for example /app/admin/loginand /app/user/login. I can’t change the subdomain. This is a grails application that uses spring security. Therefore, by default, all login requests are sent to the address /j_spring_security_check. What should I do to change the registration submit URL from /j_spring_security_checkto /app/$context/loginwhere $ context can be a user or administrator?

Another issue I am facing is how to get a request with the parameters of my user class UserDetailsServices? paramsnot available in this class, so I cannot write params.context, as in the Filters class.

Any understanding of this would be very helpful.
Thank you

+3
source share
1 answer
  • This post may help with the j_spring_security issue. The solution is not for Grails directly, but I saw that Grails allows you to configure Spring in any way you like.

  • In the question about the service level related to parameters: params is an implicit HttpRequest.parameters object for the controller. You should never expect any Http awareness in the service level.

, . - .

+1

All Articles