Files
unionflow-server-api/unionflow/unionflow-mobile-apps/scripts/keycloak_get_roles.ps1
dahoud e8ad874015 feat: WebSocket temps réel + Finance Workflow + corrections
- Task #6: WebSocket /ws/dashboard + Kafka events (5 topics)
  * Backend: KafkaEventProducer, KafkaEventConsumer
  * Mobile: WebSocketService (reconnection, heartbeat, typed events)
  * DashboardBloc: Auto-refresh depuis WebSocket events

- Finance Workflow: approbations + budgets (backend + mobile)
  * Backend: entities, services, resources, migrations Flyway V6
  * Mobile: features finance_workflow complète avec BLoC

- Corrections DI: interfaces IRepository partout
  * IProfileRepository, IOrganizationRepository, IMembreRepository
  * GetIt configuré avec @injectable

- Spec-Kit: constitution + templates mis à jour
  * .specify/memory/constitution.md enrichie
  * Templates agent, plan, spec, tasks, checklist

- Nettoyage: fichiers temporaires supprimés

Signed-off-by: lions dev Team
2026-03-15 02:12:17 +00:00

42 lines
1.6 KiB
PowerShell

# Keycloak - Lire les rôles et la config du realm unionflow
# Usage: .\keycloak_get_roles.ps1
# Prérequis: Keycloak sur http://localhost:8180, admin/admin
$baseUrl = 'http://localhost:8180'
$body = @{
username = 'admin'
password = 'admin'
grant_type = 'password'
client_id = 'admin-cli'
}
Write-Host "1. Obtention du token admin (realm master)..." -ForegroundColor Cyan
try {
$tokenResponse = Invoke-RestMethod -Uri "$baseUrl/realms/master/protocol/openid-connect/token" -Method Post -Body $body -ContentType 'application/x-www-form-urlencoded'
$token = $tokenResponse.access_token
Write-Host " Token obtenu (expire dans $($tokenResponse.expires_in) s)" -ForegroundColor Green
} catch {
Write-Host " Erreur: $_" -ForegroundColor Red
exit 1
}
Write-Host "`n2. Rôles du realm unionflow:" -ForegroundColor Cyan
try {
$roles = Invoke-RestMethod -Uri "$baseUrl/admin/realms/unionflow/roles" -Headers @{ Authorization = "Bearer $token" }
$roles | ForEach-Object { Write-Host " - $($_.name)" }
if (-not $roles) { Write-Host " (aucun rôle ou realm inexistant)" -ForegroundColor Yellow }
} catch {
Write-Host " Erreur: $_" -ForegroundColor Red
}
Write-Host "`n3. Config du realm unionflow (realm, displayName):" -ForegroundColor Cyan
try {
$realm = Invoke-RestMethod -Uri "$baseUrl/admin/realms/unionflow" -Headers @{ Authorization = "Bearer $token" }
Write-Host " realm: $($realm.realm)"
Write-Host " displayName: $($realm.displayName)"
} catch {
Write-Host " Erreur: $_" -ForegroundColor Red
}
Write-Host "`nTerminé." -ForegroundColor Green