SAMLEntryPoint extends GenericFilterBean implements AuthenticationEntryPoint { protected boolean processFilter(HttpServletRequest request) { return SAMLUtil.processFilter(filterProcessesUrl, request); }  void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException e); void setDefaultProfileOptions(WebSSOProfileOptions defaultOptions); @Autowired @Qualifier("webSSOprofile") void setWebSSOprofile(WebSSOProfile webSSOprofile); @Autowired(required = false) @Qualifier("ecpprofile") void setWebSSOprofileECP(WebSSOProfile webSSOprofileECP); @Autowired(required = false) @Qualifier("hokWebSSOProfile") void setWebSSOprofileHoK(WebSSOProfile webSSOprofileHoK); @Autowired void setSamlLogger(SAMLLogger samlLogger); @Autowired(required = false) void setSamlDiscovery(SAMLDiscovery samlDiscovery); @Autowired void setContextProvider(SAMLContextProvider contextProvider); @Autowired void setMetadata(MetadataManager metadata); String getFilterProcessesUrl(); void setFilterProcessesUrl(String filterProcessesUrl); @Override void afterPropertiesSet(); static final String FILTER_URL; static final String IDP_PARAMETER; static final String DISCOVERY_RESPONSE_PARAMETER; }
@Test public void testProcessFilter() { expect(request.getRequestURI()).andReturn("/web/saml/login"); expect(request.getRequestURI()).andReturn("/saml/login"); expect(request.getRequestURI()).andReturn("/saml"); expect(request.getRequestURI()).andReturn("/login/"); expect(request.getRequestURI()).andReturn("/saml/login/"); replayMock(); assertTrue(entryPoint.processFilter(request)); assertTrue(entryPoint.processFilter(request)); assertFalse(entryPoint.processFilter(request)); assertFalse(entryPoint.processFilter(request)); assertTrue(entryPoint.processFilter(request)); verifyMock(); }
@Test public void testProcessFilterDefault() { expect(request.getRequestURI()).andReturn("/web/saml/login"); expect(request.getRequestURI()).andReturn("/saml/login"); expect(request.getRequestURI()).andReturn("/login"); expect(request.getRequestURI()).andReturn("/sso/"); expect(request.getRequestURI()).andReturn("/login/sso/"); replayMock(); assertTrue(entryPoint.processFilter(request)); assertTrue(entryPoint.processFilter(request)); assertFalse(entryPoint.processFilter(request)); assertFalse(entryPoint.processFilter(request)); assertFalse(entryPoint.processFilter(request)); verifyMock(); }