diff --git a/cache-required-actions-authenticator/src/main/java/com/github/lucafilipozzi/keycloak/authentication/authenticators/CacheRequiredActionsAuthenticator.java b/cache-required-actions-authenticator/src/main/java/com/github/lucafilipozzi/keycloak/authentication/authenticators/CacheRequiredActionsAuthenticator.java index 6f7830f..50f50ef 100644 --- a/cache-required-actions-authenticator/src/main/java/com/github/lucafilipozzi/keycloak/authentication/authenticators/CacheRequiredActionsAuthenticator.java +++ b/cache-required-actions-authenticator/src/main/java/com/github/lucafilipozzi/keycloak/authentication/authenticators/CacheRequiredActionsAuthenticator.java @@ -2,7 +2,9 @@ package com.github.lucafilipozzi.keycloak.authentication.authenticators; import java.util.List; +import java.util.Objects; import java.util.Set; +import java.util.function.Predicate; import java.util.stream.Collectors; import java.util.stream.Stream; import lombok.extern.jbosslog.JBossLog; @@ -46,6 +48,8 @@ public void authenticate(AuthenticationFlowContext context) { ATTRIBUTE_NAME, List.copyOf( Stream.concat(newRequiredActions.stream(), oldRequiredActions.stream()) + .filter(Objects::nonNull) + .filter(Predicate.not(String::isBlank)) .collect(Collectors.toSet()))); newRequiredActions.forEach(user::removeRequiredAction); } diff --git a/pom.xml b/pom.xml index 74dc73d..8ed4b4b 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ - 1.7.0 + 1.8.0 LucaFilipozzi UTF-8 18.0.2