I am using Spring MVC for a web application. I want to use OpenID for my application, but I'm just wondering what a good way to handle authentication in general for Spring MVC.
My web application is a question and answer. Here is the scenario in which I am confused:
When the user wants to ask a question, he enters the question into the text box and clicks submit, and he sends the form to "/ question / create", which maps to the Create method in my Question controller. At this stage, if they log into the system, he will add the question to the database, but if they do not, I would like them to see the login screen, and then after the successful login, the question will be added to the database.
I donโt understand how to automatically add a question to the database after the login screen, since the form values โโwill have the form values โโfor the login screen, and not the form values โโfor adding the question screen anymore.
source share