/**
  * Triggered on every request.
  *
  * @param GetResponseEvent $event
  *
  * @return void
  */
 public function onKernelRequest(GetResponseEvent $event)
 {
     $request = $event->getRequest();
     // do nothing if this is not an attempted landlord login
     if (!$request->request->has('landlord_login_submit')) {
         return;
     }
     if (($mac = $this->macManager->getFromSession()) === null) {
         throw new InvalidMacException('No MAC stored in the session');
     }
     if ($this->cache->fetch('mac-' . $mac) === false) {
         throw new InvalidMacException('Doctrine cache has expired');
     }
 }