Skip to content

Month: December 2015

Symfony Guard component without using the whole framework

Implementing authentication in Symfony can be quite complicated. Even more so, if you attempt to use only the Security component without the whole framework. In this post I’ll show you, how you can use the Symfony Guard component with a form login and a logout link. So here’s what you can expect from implementing the code from this blog entry

  • Login with username and password by form
  • Stay logged in by using a session
  • Logout via Hyperlink “/logout”

My aim is to use as little components from Symfony as possible in this tutorial. Every project is different and I don’t know which components you might want to use.

3 Comments