diff --git a/server-spi-private/src/main/java/org/keycloak/events/EventBuilder.java b/server-spi-private/src/main/java/org/keycloak/events/EventBuilder.java index 92ad9dd4bb..166bd5ad26 100755 --- a/server-spi-private/src/main/java/org/keycloak/events/EventBuilder.java +++ b/server-spi-private/src/main/java/org/keycloak/events/EventBuilder.java @@ -48,6 +48,11 @@ public class EventBuilder { private Event event; public EventBuilder(RealmModel realm, KeycloakSession session, ClientConnection clientConnection) { + this(realm, session); + ipAddress(clientConnection.getRemoteAddr()); + } + + public EventBuilder(RealmModel realm, KeycloakSession session) { this.realm = realm; event = new Event(); @@ -76,7 +81,6 @@ public class EventBuilder { .collect(Collectors.toList()); realm(realm); - ipAddress(clientConnection.getRemoteAddr()); } private EventBuilder(EventStoreProvider store, List listeners, RealmModel realm, Event event) {