I would like to authentificate user after its registration.
So registrationAction is:
public function registrationAction(Request $request) {
//Creating user...
return $this->forward('AcmeFrontBundle:Mobile:securityCheck', array(
'_username' => $customer->getEmail(),
'_password' => 'pwd',
));
}
The problem is that Symfony security system doesn't interceipt this redirecting, but executes directly securityCheckAction which is naturally empty.
Redirection works in that way:
return $this->redirect($this->generateUrl('mobile_login_check') . "?_username=" . $customer->getEmail() . "&_password=pass");
Forwarding is preferable because I would like to use POST request for registrationAction and securityCheckAction.
Any ideas?
In the other hand maybe it would be better to authentificate user by myself? Just like described here: http://symfony.com/doc/current/cookbook/testing/simulating_authentication.html
What is your opinion?