@Test(expected = IllegalStateException.class) public void testNoIdpUrlConfiguredThrowsException() throws ServletException, IOException { testee.doFilterInternal(mock(HttpServletRequest.class), mock(HttpServletResponse.class), mock(FilterChain.class)); }
@Override protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException { if (elegIdpUrl == null || elegIdpUrl.trim().length() == 0) { throw new IllegalStateException("Cannot redirect to e-leg Identity Provider, " + "no 'cgi.funktionstjanster.saml.idp.metadata.url' configured. Check your webcert.properties file."); } httpServletResponse.sendRedirect("/saml/login/alias/eleg?idp=" + elegIdpUrl); }
ElegRedirectFilter extends OncePerRequestFilter { @Override protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException { if (elegIdpUrl == null || elegIdpUrl.trim().length() == 0) { throw new IllegalStateException("Cannot redirect to e-leg Identity Provider, " + "no 'cgi.funktionstjanster.saml.idp.metadata.url' configured. Check your webcert.properties file."); } httpServletResponse.sendRedirect("/saml/login/alias/eleg?idp=" + elegIdpUrl); } }
ElegRedirectFilter extends OncePerRequestFilter { @Override protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException { if (elegIdpUrl == null || elegIdpUrl.trim().length() == 0) { throw new IllegalStateException("Cannot redirect to e-leg Identity Provider, " + "no 'cgi.funktionstjanster.saml.idp.metadata.url' configured. Check your webcert.properties file."); } httpServletResponse.sendRedirect("/saml/login/alias/eleg?idp=" + elegIdpUrl); }  }
ElegRedirectFilter extends OncePerRequestFilter { @Override protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException { if (elegIdpUrl == null || elegIdpUrl.trim().length() == 0) { throw new IllegalStateException("Cannot redirect to e-leg Identity Provider, " + "no 'cgi.funktionstjanster.saml.idp.metadata.url' configured. Check your webcert.properties file."); } httpServletResponse.sendRedirect("/saml/login/alias/eleg?idp=" + elegIdpUrl); }   }
ElegRedirectFilter extends OncePerRequestFilter { @Override protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException { if (elegIdpUrl == null || elegIdpUrl.trim().length() == 0) { throw new IllegalStateException("Cannot redirect to e-leg Identity Provider, " + "no 'cgi.funktionstjanster.saml.idp.metadata.url' configured. Check your webcert.properties file."); } httpServletResponse.sendRedirect("/saml/login/alias/eleg?idp=" + elegIdpUrl); }    }