Alex Rivera | Logout

How to process a form login using Spring Security / Spring MVC

Asked 2010-11-01T09:25:21.820
17

Simple question, I just need a pointer in the right direction:

I have a simple Spring MVC/Spring Security webapp. Initially I set up Spring Security so that the default login page shows and authenticates properly (I implemented the UserDetailsService with the DaoAuthenticationProvider to do this).

Next step: replace the default spring login page with my login page and post the credentials.

But what do I do with the submitted login credentials? I assume I post the form to a controller, verify the credentials, but I'm not clear what the right step is after that. E.g.:

  • Am I calling a method of AuthenticationManager?
  • Do I need to define a bean for this?
  • Is there an interface/service I need to implement like an AuthenticationEntryPoint or something?

I've hit the docs 3 times over and don't quite follow them. I know this is dirt simple, so I just need to hear how the process should flow.

Edit
Report

1 Answer

1

We are talking about the same problem more and less, this is my approach let's see what people will say.

answered 2010-11-01T09:31:15.413

Your Answer