use of com.thoughtworks.go.server.service.SecurityService in project gocd by gocd.
the class GoExceptionTranslationFilterTest method setUp.
@Before
public void setUp() {
request = new MockHttpServletRequest();
response = new MockHttpServletResponse();
filterChain = mock(FilterChain.class);
authenticationException = mock(AuthenticationException.class);
basicAuth = mock(BasicProcessingFilterEntryPoint.class);
cruiseLoginFormAuth = mock(AuthenticationEntryPoint.class);
securityService = mock(SecurityService.class);
filter = new GoExceptionTranslationFilter();
filter.setUrlPatternsThatShouldNotBeRedirectedToAfterLogin("(\\.json)|(/images/)");
filter.setAuthenticationEntryPoint(cruiseLoginFormAuth);
filter.setBasicAuthenticationEntryPoint(basicAuth);
filter.setSecurityService(securityService);
}
use of com.thoughtworks.go.server.service.SecurityService in project gocd by gocd.
the class AuthorizationInterceptorTest method setup.
@Before
public void setup() throws Exception {
securityService = context.mock(SecurityService.class);
permissionInterceptor = new AuthorizationInterceptor(securityService);
request = new MockHttpServletRequest();
response = new MockHttpServletResponse();
}
Aggregations