Small fix

This commit is contained in:
Thomas Georgios Giannos 2023-12-12 09:38:25 +02:00
parent 2a00fe7ec1
commit a42e858f71
1 changed files with 2 additions and 3 deletions

View File

@ -24,9 +24,8 @@ public class MyKeycloakAdminRestApi {
@Autowired @Autowired
public MyKeycloakAdminRestApi(KeycloakClientConfiguration configuration) { public MyKeycloakAdminRestApi(KeycloakClientConfiguration configuration) {
this.configuration = configuration; this.configuration = configuration;
try (Keycloak client = this.initClient()) { Keycloak client = this.initClient();
this.realm = client.realm(configuration.getProperties().getRealm()); this.realm = client.realm(configuration.getProperties().getRealm());
}
logger.info("Custom Keycloak client initialized. Keycloak serving from {}", configuration.getProperties().getServerUrl().replace("/auth", "").replaceAll("https?://", "")); logger.info("Custom Keycloak client initialized. Keycloak serving from {}", configuration.getProperties().getServerUrl().replace("/auth", "").replaceAll("https?://", ""));
} }