Commit ab895bc6 authored by Matija Obreza's avatar Matija Obreza

Fix: Auth failure listener -- apparently it can be a String

parent c074fd84
......@@ -50,7 +50,9 @@ public class AuthenticationFailureBadCredentialsListener implements ApplicationL
final Object principal = event.getAuthentication().getPrincipal();
String userName = null;
if (principal instanceof BasicUser<?>) {
if (principal instanceof String) {
userName = (String) principal;
} else if (principal instanceof BasicUser<?>) {
userName = ((BasicUser<?>) principal).getUsername();
} else if (principal instanceof UserDetails) {
userName = ((UserDetails) principal).getUsername();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment