Class TokenRepositoryConfig

java.lang.Object
de.cuioss.benchmarking.common.repository.TokenRepositoryConfig

public class TokenRepositoryConfig extends Object
Configuration for TokenRepository to connect to Keycloak and fetch tokens for benchmark testing.
  • Constructor Details

  • Method Details

    • fromProperties

      Creates a configuration from system properties. All required properties must be provided via system properties or Maven -D arguments.
      Returns:
      TokenRepositoryConfig with values from properties
      Throws:
      IllegalArgumentException - if any required property is missing
    • requireProperty

      public static String requireProperty(String value, String description, String propertyName)
      Validates that a system property is not null or empty.
      Parameters:
      value - the property value to check
      description - human-readable description of what the property represents
      propertyName - the system property name
      Returns:
      the validated value
      Throws:
      IllegalArgumentException - if the value is null or empty