Hi everybody, I want to check if user logged successfuly or not? I just try to use a method like this:
But SecurityContextHolder.getContext().getAuthenticati on().isAuthenticated() always returns true. Any solution for this problem?
Thanks in advance.
Code:
try {
boolean isAuthenticated = SecurityContextHolder.getContext().getAuthentication().isAuthenticated();
return isAuthenticated;
} catch (Exception e) {
return false;
}
Thanks in advance.