protected void forwardToLogoutPage(
      Request request, HttpServletResponse response, SamlDeployment deployment) {
    RequestDispatcher disp = request.getRequestDispatcher(deployment.getLogoutPage());
    // make sure the login page is never cached
    response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
    response.setHeader("Pragma", "no-cache");
    response.setHeader("Expires", "0");

    try {
      disp.forward(request, response);
    } catch (ServletException e) {
      throw new RuntimeException(e);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }