public static boolean isUserMatchesAttributesStartsWith()

in src/main/java/com/epam/digital/data/platform/keycloak/rest/api/ext/UserFilter.java [37:43]


  public static boolean isUserMatchesAttributesStartsWith(UserModel userModel,
      Map<String, List<String>> attributesStartsWith) {
    return attributesStartsWith.isEmpty() ||
        attributesStartsWith.entrySet().stream().allMatch(entry -> isListEmpty(entry.getValue()) ||
            userModel.getAttributeStream(entry.getKey())
                .anyMatch(value -> entry.getValue().stream().anyMatch(value::startsWith)));
  }