Skip to content

Commit

Permalink
Merge pull request #37669 from michalvavrik/feature/fix-oidc-dev-ui-d…
Browse files Browse the repository at this point in the history
…isabled-startup

OIDC: Fix DEV UI startup when OIDC or Keycloak Dev Services is disabled
  • Loading branch information
sberyozkin authored Dec 11, 2023
2 parents 1f6890f + 491dc36 commit 49ec297
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ public OidcDevJsonRpcService(HttpConfiguration httpConfiguration, SmallRyeConfig
// we must always produce it when in DEV mode because we can't check for 'KeycloakDevServicesConfigBuildItem'
// due to circular reference: JSON RPC provider is additional bean and 'LoggingSetupBuildItem' used by
// 'KeycloakDevServicesProcessor' is created with combined index
OidcDevUiRpcSvcPropertiesBean props = Arc.container().instance(OidcDevUiRpcSvcPropertiesBean.class).get();
final var propsInstanceHandle = Arc.container().instance(OidcDevUiRpcSvcPropertiesBean.class);
final OidcDevUiRpcSvcPropertiesBean props;
if (propsInstanceHandle.isAvailable()) {
props = propsInstanceHandle.get();
} else {
// OIDC Dev UI is disabled, but this RPC service still gets initialized by Quarkus DEV UI
props = new OidcDevUiRpcSvcPropertiesBean(null, null, null, null, Map.of(), Map.of(), null, null, null, false, null,
List.of(), false, false, null, null, false);
}

this.httpPort = httpConfiguration.port;
this.config = config;
Expand Down

0 comments on commit 49ec297

Please sign in to comment.