Hey Guys, I'm doing a project using Symfony 2 and the project involves '/' as being an login/register page and all the other pages require a logged user (it will be an entity) I'm reading the book but still I think the security part is not really clear for me. I see by the demo that I can have an almost automatic login system but when I try to do something that look like the one from the demo I can't get it. My security.yml contains: system: pattern: /[a-zA-Z]+ form_login: true logout: true public: pattern: / security: false Them I created routes for my login and login_check (as the book says): _security_login: pattern: /login defaults: { _controller: MyApplicationBundle:Login:login }
_security_check: pattern: /login_check I built the Controller with the loginAction with the code from the book: public function loginAction() { if ($this->get('request')->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) { $error = $this->get('request')->attributes->get(SecurityContext::AUTHENTICATION_ERROR); } else { $error = $this->get('request')->getSession()->get(SecurityContext::AUTHENTICATION_ERROR); } return $this->render('MyApplicationBundle:Login:index.html.twig', array( 'last_username' => $this->get('request')->getSession()->get(SecurityContext::LAST_USERNAME), 'error' => $error, )); } although it prints out the form just fine the security_check (that I think has some field validation) does not happen, it says that the controller is not found (I think it makes sense) and even if I put the controller there it says I have to implement the check method. I think all of that makes perfect sense, although in the demo it uses the built-in security somehow and I couldn't figure it out. So my question, after all this text is, how can I build that, preferably using the validation features symfony provides? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en