Update - Lions User Manager - Server Implementation (Quarkus)
This commit is contained in:
@@ -28,16 +28,12 @@ public class HealthResourceEndpoint {
|
||||
Map<String, Object> health = new HashMap<>();
|
||||
|
||||
try {
|
||||
boolean connected = keycloakAdminClient.isConnected();
|
||||
health.put("status", connected ? "UP" : "DOWN");
|
||||
health.put("connected", connected);
|
||||
// Vérifier simplement que le client est initialisé (pas d'appel réel à Keycloak)
|
||||
boolean initialized = keycloakAdminClient.getInstance() != null;
|
||||
health.put("status", initialized ? "UP" : "DOWN");
|
||||
health.put("connected", initialized);
|
||||
health.put("message", initialized ? "Client Keycloak initialisé" : "Client non initialisé");
|
||||
health.put("timestamp", System.currentTimeMillis());
|
||||
|
||||
if (connected) {
|
||||
// Récupérer info serveur Keycloak
|
||||
var serverInfo = keycloakAdminClient.getInstance().serverInfo().getInfo();
|
||||
health.put("keycloakVersion", serverInfo.getSystemInfo().getVersion());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("Erreur health check Keycloak", e);
|
||||
health.put("status", "ERROR");
|
||||
|
||||
Reference in New Issue
Block a user