Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/java/com/getaxonflow/sdk/AxonFlow.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,17 @@ public final class AxonFlow implements Closeable {

private AxonFlow(AxonFlowConfig config) {
this.config = Objects.requireNonNull(config, "config cannot be null");

// Reject clientSecret without clientId — licensed mode must specify tenant
if (config.getClientSecret() != null
&& !config.getClientSecret().isEmpty()
&& (config.getClientId() == null || config.getClientId().isEmpty())) {
throw new ConfigurationException(
"clientId is required when clientSecret is set. "
+ "Set clientId to your tenant identity to avoid data being stored under the wrong tenant.",
"clientId");
}

this.httpClient = HttpClientFactory.create(config);
this.objectMapper = createObjectMapper();
this.retryExecutor = new RetryExecutor(config.getRetryConfig());
Expand Down
Loading