title: Hook-in / extend class that redirects when user not logged into secure area - Symfony2
body: <p>I have extended these three classes to hook-in and perform a different action if certain conditions are met:</p>
  
  <pre><code>DefaultAuthenticationFailureHandler
  DefaultAuthenticationSuccessHandler
  DefaultLogoutSuccessHandler
  </code></pre>
  
  <p>Everything works great and they all use more or less the same code and services.yml configuration.</p>
  
  <p>I now need to do exactly the same and hook-in to the event/class/whatever it is that performs the redirect when an attempt is made to access a page in the secure area.</p>
  
  <p>So I don't need this for when they fail the login attempt (as one of the ones above does that), but I need to hook-in on when they access a page that's in the secure area and that then usually redirects to the login page (but I want to intercept that and perform an action before the redirect).</p>
  
  <p>Ideally the answer would be something like this:</p>
  
  <p>"Just extend the DefaultAuthenticationRequired class in the same way"</p>
  
  <p>...but I don't think it's that easy</p>