public function handleViolation(Route $route)
    {

        if(in_array($route, $this->violatingRoutes)) {
            throw new ApplicationException('Circular redirects detected; aborting.');
        }

        // to avoid circular references all redirects are logged

        $this->violatingRoutes[] = $route;

        Session::getSessionDataBag()->set('authViolatingRequest', Request::createFromGlobals());

        if($redirect = $route->getRedirect()) {
            return Application::getInstance()->getRouter()->getRoute($redirect);
        }

        else {
            throw new \RuntimeException(sprintf("No redirect configured for route '%s', which cannot be authenticated.", $route->getRouteId()));
        }

    }