Class TokenRepositoryConfig
java.lang.Object
de.cuioss.benchmarking.common.repository.TokenRepositoryConfig
Configuration for TokenRepository to connect to Keycloak and fetch tokens
for benchmark testing.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSystem property keys for token repository configuration. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TokenRepositoryConfigCreates a configuration from system properties.static StringrequireProperty(String value, String description, String propertyName) Validates that a system property is not null or empty.
-
Constructor Details
-
TokenRepositoryConfig
public TokenRepositoryConfig()
-
-
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
Validates that a system property is not null or empty.- Parameters:
value- the property value to checkdescription- human-readable description of what the property representspropertyName- the system property name- Returns:
- the validated value
- Throws:
IllegalArgumentException- if the value is null or empty
-