Announcement Announcement Module
No announcement yet.
Form Authentication and Query Parameters Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Form Authentication and Query Parameters

    We are using form based authentication in our app and configuring a login page using Spring Security. We are posting to a URL with several query parameters and if the user is not logged in Spring handles redirecting to our configured login page. My question is can I access the query parameters from the original request from the login page? I know Spring keeps this information and after successfully logging in redirects the user back to the original URL (including the query string parameters), I just do not know how to access this information from the registered login page.

    Thanks for your help.

  • #2
    I think a better strategy might be to customize the AuthenticationEntryPoint (which is by default going to be a LoginUrlAuthenticationEntryPoint) to redirect to a login page with the parameters that you need. If you do not like this suggestion you can use HttpSessionRequestCache to obtain the saved request.


    • #3
      Thanks... I will give it a try.