FINERACT-1120: TFA authentication issue fix

This commit is contained in:
Aleksandar Vidakovic
2020-08-27 23:24:42 +02:00
committed by GitHub
@@ -78,7 +78,7 @@ public class TwoFactorAuthenticationFilter extends GenericFilterBean {
}
// Process two-factor only when user is authenticated
if (authentication != null && authentication.isAuthenticated()) {
if (authentication != null && authentication.isAuthenticated() && authentication.getPrincipal() instanceof AppUser) {
AppUser user = (AppUser) authentication.getPrincipal();
if (user == null) {