}
static void handleError(Exception e, HttpServletResponse response, String message) {
- LOGGER.error(message, e);
+ LOGGER.warn(message, e);
redirectToUnauthorized(response);
}
static void handleError(HttpServletResponse response, String message) {
- LOGGER.error(message);
+ LOGGER.warn(message);
redirectToUnauthorized(response);
}
underTest.doFilter(request, response, chain);
verify(response).sendRedirect("/sessions/unauthorized");
- assertThat(logTester.logs(LoggerLevel.ERROR)).containsExactlyInAnyOrder("Fail to initialize authentication with provider 'failing'");
+ assertThat(logTester.logs(LoggerLevel.WARN)).containsExactlyInAnyOrder("Fail to initialize authentication with provider 'failing'");
verifyDeleteAuthCookie();
}
}
private void assertError(String expectedError) throws Exception {
- assertThat(logTester.logs(LoggerLevel.ERROR)).contains(expectedError);
+ assertThat(logTester.logs(LoggerLevel.WARN)).contains(expectedError);
verify(response).sendRedirect("/sessions/unauthorized");
assertThat(oAuth2IdentityProvider.isInitCalled()).isFalse();
}
underTest.doFilter(request, response, chain);
verify(response).sendRedirect("/sessions/unauthorized");
- assertThat(logTester.logs(LoggerLevel.ERROR)).containsExactlyInAnyOrder("Fail to callback authentication with 'failing'");
+ assertThat(logTester.logs(LoggerLevel.WARN)).containsExactlyInAnyOrder("Fail to callback authentication with 'failing'");
verify(oAuthRedirection).delete(eq(request), eq(response));
}
}
private void assertError(String expectedError) throws Exception {
- assertThat(logTester.logs(LoggerLevel.ERROR)).contains(expectedError);
+ assertThat(logTester.logs(LoggerLevel.WARN)).contains(expectedError);
verify(response).sendRedirect("/sessions/unauthorized");
assertThat(oAuth2IdentityProvider.isInitCalled()).isFalse();
}