Skip to content

Commit

Permalink
Merge pull request quarkusio#24699 from sberyozkin/skip_devservices_k…
Browse files Browse the repository at this point in the history
…eycloak_if_provider_configured

Skip Keycloak DevService if quarkus.oidc.provider is set
  • Loading branch information
sberyozkin authored Apr 1, 2022
2 parents e30c14f + 9bf8eda commit 9aab340
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public class KeycloakDevServicesProcessor {
private static final String CONFIG_PREFIX = "quarkus.oidc.";
private static final String TENANT_ENABLED_CONFIG_KEY = CONFIG_PREFIX + "tenant-enabled";
private static final String AUTH_SERVER_URL_CONFIG_KEY = CONFIG_PREFIX + "auth-server-url";
private static final String PROVIDER_CONFIG_KEY = CONFIG_PREFIX + "provider";
// avoid the Quarkus prefix in order to prevent warnings when the application starts in container integration tests
private static final String CLIENT_AUTH_SERVER_URL_CONFIG_KEY = "client." + CONFIG_PREFIX + "auth-server-url";
private static final String APPLICATION_TYPE_CONFIG_KEY = CONFIG_PREFIX + "application-type";
Expand Down Expand Up @@ -286,6 +287,10 @@ private RunningDevService startContainer(BuildProducer<KeycloakDevServicesConfig
LOG.debug("Not starting Dev Services for Keycloak as 'quarkus.oidc.auth-server-url' has been provided");
return null;
}
if (ConfigUtils.isPropertyPresent(PROVIDER_CONFIG_KEY)) {
LOG.debug("Not starting Dev Services for Keycloak as 'quarkus.oidc.provider' has been provided");
return null;
}

if (!isDockerWorking.getAsBoolean()) {
LOG.warn("Please configure 'quarkus.oidc.auth-server-url' or get a working docker instance");
Expand Down

0 comments on commit 9aab340

Please sign in to comment.