public static void validateCustomAttributes()

in ddm-bpm-extension/src/main/java/com/epam/digital/data/platform/bpms/extension/delegate/connector/keycloak/officer/KeycloakOfficerDelegateUtils.java [88:102]


  public static void validateCustomAttributes(Map<String, Object> attributes) {
    SYSTEM_ATTRIBUTES.forEach(name -> {
      if (attributes.containsKey(name)) {
        throw new IllegalArgumentException(
            String.format("Keycloak attribute [%s] is duplicated", name));
      }
    });

    attributes.forEach((key, value) -> {
      if (!key.matches(CUSTOM_ATTRIBUTE_REGEX) || !isValidCustomAttributeValue(value)) {
        throw new IllegalArgumentException(
            String.format("Keycloak attribute %s: %s do not pass validation", key, value));
      }
    });
  }