KEYCLOAK-8977 Added method to return KeycloakSession from RealmCreationEvent

This commit is contained in:
Gideon Caranzo 2018-11-29 10:51:07 -06:00 committed by Stian Thorgersen
parent cc79963f81
commit 4cd617bc42
2 changed files with 5 additions and 0 deletions

View file

@ -81,6 +81,10 @@ public class JpaRealmProvider implements RealmProvider {
public RealmModel getCreatedRealm() { public RealmModel getCreatedRealm() {
return adapter; return adapter;
} }
@Override
public KeycloakSession getKeycloakSession() {
return session;
}
}); });
return adapter; return adapter;
} }

View file

@ -34,6 +34,7 @@ import java.util.*;
public interface RealmModel extends RoleContainerModel { public interface RealmModel extends RoleContainerModel {
interface RealmCreationEvent extends ProviderEvent { interface RealmCreationEvent extends ProviderEvent {
RealmModel getCreatedRealm(); RealmModel getCreatedRealm();
KeycloakSession getKeycloakSession();
} }
interface RealmPostCreateEvent extends ProviderEvent { interface RealmPostCreateEvent extends ProviderEvent {