diff --git a/README.md b/README.md index deed0db..116088b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This Keycloak SPI Event Listener integrates with Temporal Server, allowing you t For instance, this is how an updated realm event triggered by an administrator might look: -- Queue: keycloak +- Task Queue: keycloak - Namespace: default - JSON: @@ -39,7 +39,7 @@ To get started: 2. Copy the JAR file into your Keycloak installation. 3. Configure as described below. 4. Restart the Keycloak server. -5. Enable logging in the Keycloak UI by adding `event-listener-temporal`. +5. Enable logging in the Keycloak UI by adding `temporal`. ## Configuration @@ -51,22 +51,22 @@ You can configure the listener using one of the following methods: Use the following command-line parameters: -| Parameter | -|--------------------------------------------------------------------| -| --spi-events-listener-event-listener-temporal-server=temporal:7233 | -| --spi-events-listener-event-listener-temporal-namespace=default | -| --spi-events-listener-event-listener-temporal-queue=keycloak | +| Parameter | +|-----------------------------------------------------| +| --spi-events-listener-temporal-server=temporal:7233 | +| --spi-events-listener-temporal-namespace=default | +| --spi-events-listener-temporal-task-queue=keycloak | ### Option 2: Environment Variables Alternatively, you can set these environmental variables: -| Variable | Value | -|---------------------------------------------------------|---------------| -| KC_SPI_EVENTS_LISTENER_EVENT_LISTENER_TEMPORAL_SERVER | temporal:7233 | -| KC_SPI_EVENTS_LISTENER_EVENT_LISTENER_TEMPORAL_NAMESPACE | default | -| KC_SPI_EVENTS_LISTENER_EVENT_LISTENER_TEMPORAL_QUEUE | keycloak | +| Variable | Value | +|--------------------------------------------|---------------| +| KC_SPI_EVENTS_LISTENER_TEMPORAL_SERVER | temporal:7233 | +| KC_SPI_EVENTS_LISTENER_TEMPORAL_NAMESPACE | default | +| KC_SPI_EVENTS_LISTENER_TEMPORAL_TASK_QUEUE | keycloak | # License This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details. diff --git a/src/main/kotlin/app/infinityflow/keycloak/events/TemporalEventListenerProviderFactory.kt b/src/main/kotlin/app/infinityflow/keycloak/events/TemporalEventListenerProviderFactory.kt index 8907436..29a5d37 100644 --- a/src/main/kotlin/app/infinityflow/keycloak/events/TemporalEventListenerProviderFactory.kt +++ b/src/main/kotlin/app/infinityflow/keycloak/events/TemporalEventListenerProviderFactory.kt @@ -16,14 +16,14 @@ class TemporalEventListenerProviderFactory : EventListenerProviderFactory { private var _workflowClient: WorkflowClient? = null private var _server = "" private var _namespace = "" - private var _queue = "" + private var _taskQueue = "" override fun create(session: KeycloakSession?): EventListenerProvider { if (_logger.isDebugEnabled) { _logger.debugf("Creating %s", TemporalEventListenerProvider::class) } - return TemporalEventListenerProvider(_workflowClient!!, _queue) + return TemporalEventListenerProvider(_workflowClient!!, _taskQueue) } override fun init(config: Config.Scope?) { @@ -33,7 +33,7 @@ class TemporalEventListenerProviderFactory : EventListenerProviderFactory { _server = config?.get("server") ?: "localhost:7233" _namespace = config?.get("namespace") ?: "default" - _queue = config?.get("queue") ?: "keycloak" + _taskQueue = config?.get("task-queue") ?: "keycloak" val workflowServiceStubsOptions = WorkflowServiceStubsOptions .newBuilder() @@ -62,6 +62,6 @@ class TemporalEventListenerProviderFactory : EventListenerProviderFactory { } override fun getId(): String { - return "event-listener-temporal" + return "temporal" } } diff --git a/src/test/kotlin/app/infinityflow/keycloak/events/tests/TestScope.kt b/src/test/kotlin/app/infinityflow/keycloak/events/tests/TestScope.kt index 60d4dbe..2202504 100644 --- a/src/test/kotlin/app/infinityflow/keycloak/events/tests/TestScope.kt +++ b/src/test/kotlin/app/infinityflow/keycloak/events/tests/TestScope.kt @@ -6,7 +6,7 @@ class TestScope : Scope { private val _map: Map = mapOf( "server" to "localhost:7233", - "queue" to "default", + "task-queue" to "default", "namespace" to "default" )