I have created a web application that contains spring security. Some of the pages are protected, so that the user has to be logged in
inorder to see the pages. If a user is not logged in and tries to access one of the restricted pages, he is taken to the login screen.
I would like the user to be taken back to the original protected page after he has succ logged in.
thanks for getting back to me.
After being directed to the login page, from a protected page, the user enters username/password and is the succ authenticated. The user is then forward to the home page.
I would like the user to be forward back to the protected page, if that is possible.
That capability is automatically provided by the J2EE standard container login mechanism, which, when presented with a secured URL for a non-authenticated user initiates a login process at the server level, and only if the user logs in successfully transparently resumes the original request.
Spring security does have the ability to work in concert with this mechanism, although I have no specific details on this, as I usually don't need the extra protections of Spring Security myself. I have seen products that did, however.
Sometimes the only way things ever got fixed is because people became uncomfortable.
Hi Tim and Prasad,
would one of you be able to provide an example of integrating such a feature into the spring security configuration that I'm currently using.
It seems as though it should be a standard feature of spring security.