def testIteratingThroughASimpleFilterChain(self): filterChain = FilterChain() self.assertEquals(0, len(filterChain.chain)) httpSessionContextIntegrationFilter = HttpSessionContextIntegrationFilter( ) exceptionTranslationFilter = ExceptionTranslationFilter() authenticationProcessFilter = AuthenticationProcessingFilter() filterSecurityInterceptor = FilterSecurityInterceptor() filterChain.addFilter(httpSessionContextIntegrationFilter) filterChain.addFilter(exceptionTranslationFilter) filterChain.addFilter(authenticationProcessFilter) filterChain.addFilter(filterSecurityInterceptor) chain = filterChain.getFilterChain() self.assertEquals(httpSessionContextIntegrationFilter, chain.next()) self.assertEquals(exceptionTranslationFilter, chain.next()) self.assertEquals(authenticationProcessFilter, chain.next()) self.assertEquals(filterSecurityInterceptor, chain.next()) self.assertRaises(StopIteration, chain.next)
def exceptionTranslationFilter(self): filter = ExceptionTranslationFilter() filter.authenticationEntryPoint = self.authenticationProcessingFilterEntryPoint( ) filter.accessDeniedHandler = self.accessDeniedHandler() return filter
def exceptionTranslationFilter(self): """This filter allows re-routing to an Access Denied page in the event of a security exception.""" filter = ExceptionTranslationFilter() filter.authenticationEntryPoint = self.authenticationProcessingFilterEntryPoint() filter.accessDeniedHandler = self.accessDeniedHandler() return filter
def exceptionTranslationFilter(self): filter = ExceptionTranslationFilter() filter.authenticationEntryPoint = self.authenticationProcessingFilterEntryPoint() filter.accessDeniedHandler = self.accessDeniedHandler() return filter