use of com.thoughtworks.go.server.newsecurity.providers.PasswordBasedPluginAuthenticationProvider in project gocd by gocd.
the class AbstractReAuthenticationFilterTest method setUp.
@BeforeEach
void setUp() {
response = new MockHttpServletResponse();
filterChain = mock(FilterChain.class);
securityService = mock(SecurityService.class);
systemEnvironment = mock(SystemEnvironment.class);
when(systemEnvironment.isReAuthenticationEnabled()).thenReturn(true);
passwordBasedPluginAuthenticationProvider = mock(PasswordBasedPluginAuthenticationProvider.class);
webBasedPluginAuthenticationProvider = mock(WebBasedPluginAuthenticationProvider.class);
anonymousAuthenticationProvider = mock(AnonymousAuthenticationProvider.class);
clock = new TestingClock();
filter = spy(new AbstractReAuthenticationFilter(securityService, systemEnvironment, clock, passwordBasedPluginAuthenticationProvider, webBasedPluginAuthenticationProvider, anonymousAuthenticationProvider) {
@Override
protected void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, String errorMessage) throws IOException {
}
});
}
Aggregations