logging and try catch

This commit is contained in:
Anthony Stirling
2024-06-02 11:59:43 +01:00
parent c4a620e3f5
commit eb526a5d0c
21 changed files with 125 additions and 71 deletions

View File

@@ -47,11 +47,11 @@ public class CustomAuthenticationFailureHandler extends SimpleUrlAuthenticationF
response.sendRedirect("/login?error=oauth2AuthenticationError");
return;
}
String username = request.getParameter("username");
Optional<User> optUser = userService.findByUsernameIgnoreCase(username);
if (username != null && optUser.isPresent() && !isDemoUser(optUser) ) {
if (username != null && optUser.isPresent() && !isDemoUser(optUser)) {
logger.info(
"Remaining attempts for user {}: {}",
optUser.get().getUsername(),