After a user creates their account, I want to log that user on automatically.
I have standard form logins being handled by Springs filter on /postlogin
. If I go to http://localhost/postlogin
it attempts to log me in (fails because I didn't include the post parameters), but makes the proper attempt.
But if I want to log the user in programatically and I try to return from the controller: "forward:/postlogin" I get a 404.
I assume the forward: directive is not passing through the filters, thus not getting handled by the UsernamePasswordAuthenticationFilter
.
How do I manually induce a login programatically? I want to do this after the user creates a new account (they should be logged into that account immediately upon completion of the registration).