java.lang.Object
io.helidon.integrations.vault.VaultUtil

public final class VaultUtil extends Object
Utility class for Vault API.
  • Method Details

    • arrayToList

      public static List<String> arrayToList(JsonArray array)
      Create a list of strings from JSON array.
      Parameters:
      array - array to process
      Returns:
      each element from the array as a string
    • processListDataResponse

      public static List<String> processListDataResponse(JsonObject response)
      Process response from LIST operations. Finds the data object, and processes the keys array.
      Parameters:
      response - JSON response from API LIST call
      Returns:
      keys as a list of strings
    • toMap

      public static Map<String,String> toMap(JsonObject object, String name)
      Return a map of a json object that is nested in the provided object. If the name is nil or not present, returns an empty map.
      Parameters:
      object - JSON object to process
      name - name of a nested JSON object to return as a map
      Returns:
      map representation of the nested object