diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderFactory.java b/broker/core/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderFactory.java old mode 100644 new mode 100755 index b615f3858c..28286eeb66 --- a/broker/core/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderFactory.java +++ b/broker/core/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderFactory.java @@ -19,6 +19,7 @@ package org.keycloak.broker.provider; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.io.InputStream; import java.util.HashMap; @@ -39,6 +40,11 @@ public abstract class AbstractIdentityProviderFactoryStian Thorgersen @@ -19,6 +20,11 @@ public class LiquibaseJpaUpdaterProviderFactory implements JpaUpdaterProviderFac public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/connections/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java b/connections/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java index 2e7841a60c..b15755c444 100755 --- a/connections/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java +++ b/connections/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java @@ -5,6 +5,7 @@ import org.jboss.logging.Logger; import org.keycloak.Config; import org.keycloak.connections.jpa.updater.JpaUpdaterProvider; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import javax.naming.InitialContext; import javax.persistence.EntityManager; @@ -56,6 +57,11 @@ public class DefaultJpaConnectionProviderFactory implements JpaConnectionProvide this.config = config; } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + private void lazyInit(KeycloakSession session) { if (emf == null) { synchronized (this) { diff --git a/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java b/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java old mode 100644 new mode 100755 index e52816c825..3c0db050c5 --- a/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java +++ b/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java @@ -12,6 +12,7 @@ import org.keycloak.connections.mongo.impl.MongoStoreImpl; import org.keycloak.connections.mongo.impl.context.TransactionMongoStoreInvocationContext; import org.keycloak.connections.mongo.updater.DefaultMongoUpdaterProvider; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.lang.reflect.Method; import java.util.Collections; @@ -60,6 +61,12 @@ public class DefaultMongoConnectionFactoryProvider implements MongoConnectionPro this.config = config; } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + + private void lazyInit() { if (client == null) { synchronized (this) { diff --git a/connections/mongo/src/main/java/org/keycloak/connections/mongo/updater/DefaultMongoUpdaterProviderFactory.java b/connections/mongo/src/main/java/org/keycloak/connections/mongo/updater/DefaultMongoUpdaterProviderFactory.java old mode 100644 new mode 100755 index 80698505b0..986bf12098 --- a/connections/mongo/src/main/java/org/keycloak/connections/mongo/updater/DefaultMongoUpdaterProviderFactory.java +++ b/connections/mongo/src/main/java/org/keycloak/connections/mongo/updater/DefaultMongoUpdaterProviderFactory.java @@ -2,6 +2,7 @@ package org.keycloak.connections.mongo.updater; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; /** * @author Stian Thorgersen @@ -17,6 +18,10 @@ public class DefaultMongoUpdaterProviderFactory implements MongoUpdaterProviderF public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } @Override public void close() { } diff --git a/events/email/src/main/java/org/keycloak/events/email/EmailEventListenerProviderFactory.java b/events/email/src/main/java/org/keycloak/events/email/EmailEventListenerProviderFactory.java index d479116ed6..9f662dc2d7 100755 --- a/events/email/src/main/java/org/keycloak/events/email/EmailEventListenerProviderFactory.java +++ b/events/email/src/main/java/org/keycloak/events/email/EmailEventListenerProviderFactory.java @@ -6,6 +6,7 @@ import org.keycloak.events.EventListenerProvider; import org.keycloak.events.EventListenerProviderFactory; import org.keycloak.events.EventType; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.util.Collections; import java.util.HashSet; @@ -48,6 +49,11 @@ public class EmailEventListenerProviderFactory implements EventListenerProviderF } } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/events/jboss-logging/src/main/java/org/keycloak/events/log/JBossLoggingEventListenerProviderFactory.java b/events/jboss-logging/src/main/java/org/keycloak/events/log/JBossLoggingEventListenerProviderFactory.java old mode 100644 new mode 100755 index 1bb4660e22..1c91ceabd6 --- a/events/jboss-logging/src/main/java/org/keycloak/events/log/JBossLoggingEventListenerProviderFactory.java +++ b/events/jboss-logging/src/main/java/org/keycloak/events/log/JBossLoggingEventListenerProviderFactory.java @@ -5,6 +5,7 @@ import org.keycloak.Config; import org.keycloak.events.EventListenerProvider; import org.keycloak.events.EventListenerProviderFactory; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; /** * @author Stian Thorgersen @@ -24,6 +25,11 @@ public class JBossLoggingEventListenerProviderFactory implements EventListenerPr public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/events/jpa/src/main/java/org/keycloak/events/jpa/JpaEventStoreProviderFactory.java b/events/jpa/src/main/java/org/keycloak/events/jpa/JpaEventStoreProviderFactory.java index c8964eecce..819c58f1dc 100755 --- a/events/jpa/src/main/java/org/keycloak/events/jpa/JpaEventStoreProviderFactory.java +++ b/events/jpa/src/main/java/org/keycloak/events/jpa/JpaEventStoreProviderFactory.java @@ -6,6 +6,7 @@ import org.keycloak.events.EventStoreProvider; import org.keycloak.events.EventStoreProviderFactory; import org.keycloak.events.EventType; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.util.HashSet; import java.util.Set; @@ -46,6 +47,11 @@ public class JpaEventStoreProviderFactory implements EventStoreProviderFactory { } } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/events/mongo/src/main/java/org/keycloak/events/mongo/MongoEventStoreProviderFactory.java b/events/mongo/src/main/java/org/keycloak/events/mongo/MongoEventStoreProviderFactory.java index 41d057dbb9..517bad6c20 100755 --- a/events/mongo/src/main/java/org/keycloak/events/mongo/MongoEventStoreProviderFactory.java +++ b/events/mongo/src/main/java/org/keycloak/events/mongo/MongoEventStoreProviderFactory.java @@ -9,6 +9,7 @@ import org.keycloak.events.EventStoreProvider; import org.keycloak.events.EventStoreProviderFactory; import org.keycloak.events.EventType; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.util.HashSet; import java.util.Set; @@ -55,6 +56,11 @@ public class MongoEventStoreProviderFactory implements EventStoreProviderFactory } } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/events/syslog/src/main/java/org/keycloak/events/log/SysLoggingEventListenerProviderFactory.java b/events/syslog/src/main/java/org/keycloak/events/log/SysLoggingEventListenerProviderFactory.java old mode 100644 new mode 100755 index 18bc8e6bd0..a1d1f7905e --- a/events/syslog/src/main/java/org/keycloak/events/log/SysLoggingEventListenerProviderFactory.java +++ b/events/syslog/src/main/java/org/keycloak/events/log/SysLoggingEventListenerProviderFactory.java @@ -4,6 +4,7 @@ import org.keycloak.Config; import org.keycloak.events.EventListenerProvider; import org.keycloak.events.EventListenerProviderFactory; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.productivity.java.syslog4j.Syslog; import org.productivity.java.syslog4j.SyslogIF; @@ -35,6 +36,11 @@ public class SysLoggingEventListenerProviderFactory implements EventListenerProv syslogger.getConfig().setPort(port); } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/examples/providers/event-listener-sysout/src/main/java/org/keycloak/examples/providers/events/SysoutEventListenerProviderFactory.java b/examples/providers/event-listener-sysout/src/main/java/org/keycloak/examples/providers/events/SysoutEventListenerProviderFactory.java old mode 100644 new mode 100755 index 600ddf0db2..ab2b403398 --- a/examples/providers/event-listener-sysout/src/main/java/org/keycloak/examples/providers/events/SysoutEventListenerProviderFactory.java +++ b/examples/providers/event-listener-sysout/src/main/java/org/keycloak/examples/providers/events/SysoutEventListenerProviderFactory.java @@ -5,6 +5,7 @@ import org.keycloak.events.EventListenerProvider; import org.keycloak.events.EventListenerProviderFactory; import org.keycloak.events.EventType; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.util.HashSet; import java.util.Set; @@ -32,6 +33,10 @@ public class SysoutEventListenerProviderFactory implements EventListenerProvider } } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } @Override public void close() { } diff --git a/examples/providers/event-store-mem/src/main/java/org/keycloak/examples/providers/events/MemEventStoreProviderFactory.java b/examples/providers/event-store-mem/src/main/java/org/keycloak/examples/providers/events/MemEventStoreProviderFactory.java index acb2b0c872..a7dd5b3ddc 100755 --- a/examples/providers/event-store-mem/src/main/java/org/keycloak/examples/providers/events/MemEventStoreProviderFactory.java +++ b/examples/providers/event-store-mem/src/main/java/org/keycloak/examples/providers/events/MemEventStoreProviderFactory.java @@ -6,6 +6,7 @@ import org.keycloak.events.EventStoreProvider; import org.keycloak.events.EventStoreProviderFactory; import org.keycloak.events.EventType; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.util.Collections; import java.util.HashSet; @@ -40,6 +41,10 @@ public class MemEventStoreProviderFactory implements EventStoreProviderFactory { } } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } @Override public void close() { events = null; diff --git a/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/BasePropertiesFederationFactory.java b/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/BasePropertiesFederationFactory.java index d79a13b743..24f30b47c3 100755 --- a/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/BasePropertiesFederationFactory.java +++ b/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/BasePropertiesFederationFactory.java @@ -87,6 +87,11 @@ public abstract class BasePropertiesFederationFactory implements UserFederationP } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { diff --git a/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirExportProviderFactory.java b/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirExportProviderFactory.java index 44bed4b82d..7d24341ad6 100755 --- a/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirExportProviderFactory.java +++ b/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirExportProviderFactory.java @@ -5,6 +5,7 @@ import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ExportProvider; import org.keycloak.exportimport.ExportProviderFactory; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.io.File; @@ -25,6 +26,11 @@ public class DirExportProviderFactory implements ExportProviderFactory { public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProviderFactory.java b/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProviderFactory.java index 6bea93ef3d..07577495df 100755 --- a/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProviderFactory.java +++ b/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProviderFactory.java @@ -5,6 +5,7 @@ import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ImportProvider; import org.keycloak.exportimport.ImportProviderFactory; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.io.File; @@ -23,6 +24,11 @@ public class DirImportProviderFactory implements ImportProviderFactory { public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProviderFactory.java b/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProviderFactory.java index 6cef5cc4a5..42db252248 100755 --- a/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProviderFactory.java +++ b/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProviderFactory.java @@ -5,6 +5,7 @@ import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ExportProvider; import org.keycloak.exportimport.ExportProviderFactory; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.io.File; @@ -25,6 +26,11 @@ public class SingleFileExportProviderFactory implements ExportProviderFactory { public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProviderFactory.java b/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProviderFactory.java index 77be794509..b0d594abfb 100755 --- a/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProviderFactory.java +++ b/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProviderFactory.java @@ -5,6 +5,7 @@ import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ImportProvider; import org.keycloak.exportimport.ImportProviderFactory; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.io.File; @@ -23,6 +24,11 @@ public class SingleFileImportProviderFactory implements ImportProviderFactory { public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProviderFactory.java b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProviderFactory.java index b8af4b1761..2fd45d4b93 100755 --- a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProviderFactory.java +++ b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProviderFactory.java @@ -5,6 +5,7 @@ import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ExportProvider; import org.keycloak.exportimport.ExportProviderFactory; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.io.File; @@ -33,6 +34,11 @@ public class ZipExportProviderFactory implements ExportProviderFactory { public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProviderFactory.java b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProviderFactory.java index 8589fb4824..1aed3a5b91 100755 --- a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProviderFactory.java +++ b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProviderFactory.java @@ -5,6 +5,7 @@ import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ImportProvider; import org.keycloak.exportimport.ImportProviderFactory; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.io.File; @@ -30,6 +31,11 @@ public class ZipImportProviderFactory implements ImportProviderFactory { public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/federation/kerberos/src/main/java/org/keycloak/federation/kerberos/KerberosFederationProviderFactory.java b/federation/kerberos/src/main/java/org/keycloak/federation/kerberos/KerberosFederationProviderFactory.java old mode 100644 new mode 100755 index 871587ca0e..375f2cf677 --- a/federation/kerberos/src/main/java/org/keycloak/federation/kerberos/KerberosFederationProviderFactory.java +++ b/federation/kerberos/src/main/java/org/keycloak/federation/kerberos/KerberosFederationProviderFactory.java @@ -60,6 +60,11 @@ public class KerberosFederationProviderFactory implements UserFederationProvider } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { diff --git a/federation/ldap/src/main/java/org/keycloak/federation/ldap/LDAPFederationProviderFactory.java b/federation/ldap/src/main/java/org/keycloak/federation/ldap/LDAPFederationProviderFactory.java index 16a877f681..c197052df9 100755 --- a/federation/ldap/src/main/java/org/keycloak/federation/ldap/LDAPFederationProviderFactory.java +++ b/federation/ldap/src/main/java/org/keycloak/federation/ldap/LDAPFederationProviderFactory.java @@ -57,6 +57,11 @@ public class LDAPFederationProviderFactory implements UserFederationProviderFact public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProviderFactory.java b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProviderFactory.java old mode 100644 new mode 100755 index 2bd8ee625e..0b0da3c520 --- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProviderFactory.java +++ b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProviderFactory.java @@ -5,6 +5,7 @@ import org.keycloak.account.AccountProvider; import org.keycloak.account.AccountProviderFactory; import org.keycloak.freemarker.FreeMarkerUtil; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; /** * @author Stian Thorgersen @@ -23,6 +24,10 @@ public class FreeMarkerAccountProviderFactory implements AccountProviderFactory freeMarker = new FreeMarkerUtil(); } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } @Override public void close() { freeMarker = null; diff --git a/forms/common-freemarker/src/main/java/org/keycloak/freemarker/ExtendingThemeManagerFactory.java b/forms/common-freemarker/src/main/java/org/keycloak/freemarker/ExtendingThemeManagerFactory.java old mode 100644 new mode 100755 index b2246dafb4..2fdaf0513c --- a/forms/common-freemarker/src/main/java/org/keycloak/freemarker/ExtendingThemeManagerFactory.java +++ b/forms/common-freemarker/src/main/java/org/keycloak/freemarker/ExtendingThemeManagerFactory.java @@ -2,6 +2,7 @@ package org.keycloak.freemarker; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.util.concurrent.ConcurrentHashMap; @@ -26,6 +27,11 @@ public class ExtendingThemeManagerFactory implements ThemeProviderFactory { } } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/forms/common-themes/src/main/java/org/keycloak/theme/DefaultKeycloakThemeProviderFactory.java b/forms/common-themes/src/main/java/org/keycloak/theme/DefaultKeycloakThemeProviderFactory.java old mode 100644 new mode 100755 index 41586791ed..807e15c8f6 --- a/forms/common-themes/src/main/java/org/keycloak/theme/DefaultKeycloakThemeProviderFactory.java +++ b/forms/common-themes/src/main/java/org/keycloak/theme/DefaultKeycloakThemeProviderFactory.java @@ -4,6 +4,7 @@ import org.keycloak.Config; import org.keycloak.freemarker.ThemeProvider; import org.keycloak.freemarker.ThemeProviderFactory; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; /** * @author Stian Thorgersen @@ -22,6 +23,11 @@ public class DefaultKeycloakThemeProviderFactory implements ThemeProviderFactory themeProvider = new DefaultKeycloakThemeProvider(); } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { themeProvider = null; diff --git a/forms/common-themes/src/main/java/org/keycloak/theme/FolderThemeProviderFactory.java b/forms/common-themes/src/main/java/org/keycloak/theme/FolderThemeProviderFactory.java old mode 100644 new mode 100755 index d85f289828..a780643aa0 --- a/forms/common-themes/src/main/java/org/keycloak/theme/FolderThemeProviderFactory.java +++ b/forms/common-themes/src/main/java/org/keycloak/theme/FolderThemeProviderFactory.java @@ -4,6 +4,7 @@ import org.keycloak.Config; import org.keycloak.freemarker.ThemeProvider; import org.keycloak.freemarker.ThemeProviderFactory; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import java.io.File; @@ -29,6 +30,11 @@ public class FolderThemeProviderFactory implements ThemeProviderFactory { themeProvider = new FolderThemeProvider(rootDir); } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { diff --git a/forms/email-freemarker/src/main/java/org/keycloak/email/freemarker/FreeMarkerEmailProviderFactory.java b/forms/email-freemarker/src/main/java/org/keycloak/email/freemarker/FreeMarkerEmailProviderFactory.java old mode 100644 new mode 100755 index 7e1fcaf687..f0dc1209ed --- a/forms/email-freemarker/src/main/java/org/keycloak/email/freemarker/FreeMarkerEmailProviderFactory.java +++ b/forms/email-freemarker/src/main/java/org/keycloak/email/freemarker/FreeMarkerEmailProviderFactory.java @@ -5,6 +5,7 @@ import org.keycloak.email.EmailProvider; import org.keycloak.email.EmailProviderFactory; import org.keycloak.freemarker.FreeMarkerUtil; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; /** * @author Stian Thorgersen @@ -23,6 +24,11 @@ public class FreeMarkerEmailProviderFactory implements EmailProviderFactory { freeMarker = new FreeMarkerUtil(); } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { freeMarker = null; diff --git a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/FreeMarkerLoginFormsProviderFactory.java b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/FreeMarkerLoginFormsProviderFactory.java index 8257f105bc..2452b7a2f4 100755 --- a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/FreeMarkerLoginFormsProviderFactory.java +++ b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/FreeMarkerLoginFormsProviderFactory.java @@ -5,6 +5,7 @@ import org.keycloak.freemarker.FreeMarkerUtil; import org.keycloak.login.LoginFormsProvider; import org.keycloak.login.LoginFormsProviderFactory; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; /** * @author Stian Thorgersen @@ -23,6 +24,10 @@ public class FreeMarkerLoginFormsProviderFactory implements LoginFormsProviderFa freeMarker = new FreeMarkerUtil(); } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } @Override public void close() { freeMarker = null; diff --git a/model/api/src/main/java/org/keycloak/provider/ProviderFactory.java b/model/api/src/main/java/org/keycloak/provider/ProviderFactory.java old mode 100644 new mode 100755 index 14ce18cd69..e047d66fc6 --- a/model/api/src/main/java/org/keycloak/provider/ProviderFactory.java +++ b/model/api/src/main/java/org/keycloak/provider/ProviderFactory.java @@ -2,6 +2,7 @@ package org.keycloak.provider; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; /** * @author Stian Thorgersen @@ -12,6 +13,11 @@ public interface ProviderFactory { public void init(Config.Scope config); + /** + * Called after all provider factories have been initialized + */ + public void postInit(KeycloakSessionFactory factory); + public void close(); public String getId(); diff --git a/model/invalidation-cache/infinispan/src/main/java/org/keycloak/models/cache/infinispan/InfinispanCacheRealmProviderFactory.java b/model/invalidation-cache/infinispan/src/main/java/org/keycloak/models/cache/infinispan/InfinispanCacheRealmProviderFactory.java index 9bbbed95c4..5791f3eb7b 100755 --- a/model/invalidation-cache/infinispan/src/main/java/org/keycloak/models/cache/infinispan/InfinispanCacheRealmProviderFactory.java +++ b/model/invalidation-cache/infinispan/src/main/java/org/keycloak/models/cache/infinispan/InfinispanCacheRealmProviderFactory.java @@ -4,6 +4,7 @@ import org.infinispan.Cache; import org.keycloak.Config; import org.keycloak.connections.infinispan.InfinispanConnectionProvider; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.cache.CacheRealmProvider; import org.keycloak.models.cache.CacheRealmProviderFactory; import org.keycloak.models.cache.DefaultCacheRealmProvider; @@ -30,6 +31,11 @@ public class InfinispanCacheRealmProviderFactory implements CacheRealmProviderFa public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/model/invalidation-cache/infinispan/src/main/java/org/keycloak/models/cache/infinispan/InfinispanCacheUserProviderFactory.java b/model/invalidation-cache/infinispan/src/main/java/org/keycloak/models/cache/infinispan/InfinispanCacheUserProviderFactory.java index cb8881597b..bbe8981238 100755 --- a/model/invalidation-cache/infinispan/src/main/java/org/keycloak/models/cache/infinispan/InfinispanCacheUserProviderFactory.java +++ b/model/invalidation-cache/infinispan/src/main/java/org/keycloak/models/cache/infinispan/InfinispanCacheUserProviderFactory.java @@ -9,6 +9,7 @@ import org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent; import org.keycloak.Config; import org.keycloak.connections.infinispan.InfinispanConnectionProvider; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.cache.CacheUserProvider; import org.keycloak.models.cache.CacheUserProviderFactory; import org.keycloak.models.cache.DefaultCacheUserProvider; @@ -62,6 +63,11 @@ public class InfinispanCacheUserProviderFactory implements CacheUserProviderFact public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/MemoryCacheRealmProviderFactory.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/MemoryCacheRealmProviderFactory.java index b37901dbc8..a8ceadabe3 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/MemoryCacheRealmProviderFactory.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/MemoryCacheRealmProviderFactory.java @@ -2,6 +2,7 @@ package org.keycloak.models.cache; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; /** * @author Bill Burke @@ -21,6 +22,11 @@ public class MemoryCacheRealmProviderFactory implements CacheRealmProviderFactor } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { //To change body of implemented methods use File | Settings | File Templates. diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/MemoryCacheUserProviderFactory.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/MemoryCacheUserProviderFactory.java index 54974b7ca8..bf1b4d2859 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/MemoryCacheUserProviderFactory.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/MemoryCacheUserProviderFactory.java @@ -2,6 +2,7 @@ package org.keycloak.models.cache; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; /** * @author Bill Burke @@ -23,6 +24,11 @@ public class MemoryCacheUserProviderFactory implements CacheUserProviderFactory cache.setMaxUserCacheSize(size); } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { //To change body of implemented methods use File | Settings | File Templates. diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/NoCacheRealmProviderFactory.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/NoCacheRealmProviderFactory.java index 68b6f35140..87e1d9e45c 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/NoCacheRealmProviderFactory.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/NoCacheRealmProviderFactory.java @@ -2,6 +2,7 @@ package org.keycloak.models.cache; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; /** * @author Bill Burke @@ -23,6 +24,11 @@ public class NoCacheRealmProviderFactory implements CacheRealmProviderFactory { //To change body of implemented methods use File | Settings | File Templates. } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public String getId() { return "none"; diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/NoCacheUserProviderFactory.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/NoCacheUserProviderFactory.java index 1008a00918..7225562976 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/NoCacheUserProviderFactory.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/NoCacheUserProviderFactory.java @@ -2,6 +2,7 @@ package org.keycloak.models.cache; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; /** * @author Bill Burke @@ -23,6 +24,11 @@ public class NoCacheUserProviderFactory implements CacheUserProviderFactory { //To change body of implemented methods use File | Settings | File Templates. } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public String getId() { return "none"; diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/JpaRealmProviderFactory.java b/model/jpa/src/main/java/org/keycloak/models/jpa/JpaRealmProviderFactory.java index 7e090c2142..886522c4a6 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/JpaRealmProviderFactory.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/JpaRealmProviderFactory.java @@ -3,6 +3,7 @@ package org.keycloak.models.jpa; import org.keycloak.Config; import org.keycloak.connections.jpa.JpaConnectionProvider; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.RealmProvider; import org.keycloak.models.RealmProviderFactory; @@ -18,6 +19,11 @@ public class JpaRealmProviderFactory implements RealmProviderFactory { public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public String getId() { return "jpa"; diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/JpaUserProviderFactory.java b/model/jpa/src/main/java/org/keycloak/models/jpa/JpaUserProviderFactory.java index 3a52f12a2e..b7d7cf3ca3 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/JpaUserProviderFactory.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/JpaUserProviderFactory.java @@ -3,6 +3,7 @@ package org.keycloak.models.jpa; import org.keycloak.Config; import org.keycloak.connections.jpa.JpaConnectionProvider; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.UserProvider; import org.keycloak.models.UserProviderFactory; @@ -18,6 +19,11 @@ public class JpaUserProviderFactory implements UserProviderFactory { public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public String getId() { return "jpa"; diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoRealmProviderFactory.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoRealmProviderFactory.java index dd62b788e0..145d5987a0 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoRealmProviderFactory.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoRealmProviderFactory.java @@ -4,6 +4,7 @@ import org.jboss.logging.Logger; import org.keycloak.Config; import org.keycloak.connections.mongo.MongoConnectionProvider; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.RealmProvider; import org.keycloak.models.RealmProviderFactory; @@ -25,6 +26,11 @@ public class MongoRealmProviderFactory implements RealmProviderFactory { public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public RealmProvider create(KeycloakSession session) { MongoConnectionProvider connection = session.getProvider(MongoConnectionProvider.class); diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoUserProviderFactory.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoUserProviderFactory.java index a11704827b..02e7635b79 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoUserProviderFactory.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoUserProviderFactory.java @@ -4,6 +4,7 @@ import org.jboss.logging.Logger; import org.keycloak.Config; import org.keycloak.connections.mongo.MongoConnectionProvider; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.UserProvider; import org.keycloak.models.UserProviderFactory; @@ -24,6 +25,11 @@ public class MongoUserProviderFactory implements UserProviderFactory { public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public UserProvider create(KeycloakSession session) { MongoConnectionProvider connection = session.getProvider(MongoConnectionProvider.class); diff --git a/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/InfinispanUserSessionProviderFactory.java b/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/InfinispanUserSessionProviderFactory.java index 7d76335231..c6bfd63b19 100755 --- a/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/InfinispanUserSessionProviderFactory.java +++ b/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/InfinispanUserSessionProviderFactory.java @@ -4,6 +4,7 @@ import org.infinispan.Cache; import org.keycloak.Config; import org.keycloak.connections.infinispan.InfinispanConnectionProvider; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.UserSessionProvider; import org.keycloak.models.UserSessionProviderFactory; import org.keycloak.models.sessions.infinispan.entities.LoginFailureEntity; @@ -27,6 +28,11 @@ public class InfinispanUserSessionProviderFactory implements UserSessionProvider public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/JpaUserSessionProviderFactory.java b/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/JpaUserSessionProviderFactory.java index fca5ca1d49..d1eddc245f 100755 --- a/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/JpaUserSessionProviderFactory.java +++ b/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/JpaUserSessionProviderFactory.java @@ -3,6 +3,7 @@ package org.keycloak.models.sessions.jpa; import org.keycloak.Config; import org.keycloak.connections.jpa.JpaConnectionProvider; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.UserSessionProvider; import org.keycloak.models.UserSessionProviderFactory; @@ -19,6 +20,11 @@ public class JpaUserSessionProviderFactory implements UserSessionProviderFactory public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public String getId() { return ID; diff --git a/model/sessions-mem/src/main/java/org/keycloak/models/sessions/mem/MemUserSessionProviderFactory.java b/model/sessions-mem/src/main/java/org/keycloak/models/sessions/mem/MemUserSessionProviderFactory.java old mode 100644 new mode 100755 index 27d11e737d..a943eca7da --- a/model/sessions-mem/src/main/java/org/keycloak/models/sessions/mem/MemUserSessionProviderFactory.java +++ b/model/sessions-mem/src/main/java/org/keycloak/models/sessions/mem/MemUserSessionProviderFactory.java @@ -2,6 +2,7 @@ package org.keycloak.models.sessions.mem; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.UserSessionProvider; import org.keycloak.models.UserSessionProviderFactory; import org.keycloak.models.sessions.mem.entities.ClientSessionEntity; @@ -33,6 +34,11 @@ public class MemUserSessionProviderFactory implements UserSessionProviderFactory public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { userSessions.clear(); diff --git a/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/MongoUserSessionProviderFactory.java b/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/MongoUserSessionProviderFactory.java old mode 100644 new mode 100755 index a6b22b7088..70c4af172c --- a/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/MongoUserSessionProviderFactory.java +++ b/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/MongoUserSessionProviderFactory.java @@ -3,6 +3,7 @@ package org.keycloak.models.sessions.mongo; import org.keycloak.Config; import org.keycloak.connections.mongo.MongoConnectionProvider; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.UserSessionProvider; import org.keycloak.models.UserSessionProviderFactory; @@ -23,6 +24,11 @@ public class MongoUserSessionProviderFactory implements UserSessionProviderFacto public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/ldap/LDAPPartitionManagerProviderFactory.java b/picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/ldap/LDAPPartitionManagerProviderFactory.java old mode 100644 new mode 100755 index b647057e46..851201d8f0 --- a/picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/ldap/LDAPPartitionManagerProviderFactory.java +++ b/picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/ldap/LDAPPartitionManagerProviderFactory.java @@ -2,6 +2,7 @@ package org.keycloak.picketlink.ldap; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.picketlink.PartitionManagerProvider; import org.keycloak.picketlink.PartitionManagerProviderFactory; import org.picketlink.idm.PartitionManager; @@ -25,6 +26,11 @@ public class LDAPPartitionManagerProviderFactory implements PartitionManagerProv partitionManagerRegistry = new PartitionManagerRegistry(); } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/project-integrations/aerogear-ups/auth-server/src/main/java/org/aerogear/ups/security/AerogearThemeProviderFactory.java b/project-integrations/aerogear-ups/auth-server/src/main/java/org/aerogear/ups/security/AerogearThemeProviderFactory.java index eb153e123e..f2a124bb95 100755 --- a/project-integrations/aerogear-ups/auth-server/src/main/java/org/aerogear/ups/security/AerogearThemeProviderFactory.java +++ b/project-integrations/aerogear-ups/auth-server/src/main/java/org/aerogear/ups/security/AerogearThemeProviderFactory.java @@ -4,6 +4,7 @@ import org.keycloak.Config; import org.keycloak.freemarker.ThemeProvider; import org.keycloak.freemarker.ThemeProviderFactory; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; /** * @author Bill Burke @@ -22,6 +23,11 @@ public class AerogearThemeProviderFactory implements ThemeProviderFactory { theme = new AerogearThemeProvider(); } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { diff --git a/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/EntityDescriptorImporterFactory.java b/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/EntityDescriptorImporterFactory.java index 43252b7a05..51644d904a 100755 --- a/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/EntityDescriptorImporterFactory.java +++ b/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/EntityDescriptorImporterFactory.java @@ -4,6 +4,7 @@ import org.keycloak.Config; import org.keycloak.exportimport.ApplicationImporter; import org.keycloak.exportimport.ApplicationImporterFactory; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; /** * @author Bill Burke @@ -25,6 +26,10 @@ public class EntityDescriptorImporterFactory implements ApplicationImporterFacto } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } @Override public void close() { diff --git a/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/SamlProtocolFactory.java b/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/SamlProtocolFactory.java index e2c0fd5bc7..8bb4d46598 100755 --- a/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/SamlProtocolFactory.java +++ b/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/SamlProtocolFactory.java @@ -3,6 +3,7 @@ package org.keycloak.protocol.saml; import org.keycloak.Config; import org.keycloak.events.EventBuilder; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.RealmModel; import org.keycloak.protocol.LoginProtocol; import org.keycloak.protocol.LoginProtocolFactory; @@ -31,6 +32,10 @@ public class SamlProtocolFactory implements LoginProtocolFactory { sts.installDefaultConfiguration(); } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } @Override public void close() { diff --git a/services/src/main/java/org/keycloak/protocol/oidc/OIDCLoginProtocolFactory.java b/services/src/main/java/org/keycloak/protocol/oidc/OIDCLoginProtocolFactory.java index b0e3605080..d8ff2e4b38 100755 --- a/services/src/main/java/org/keycloak/protocol/oidc/OIDCLoginProtocolFactory.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/OIDCLoginProtocolFactory.java @@ -3,6 +3,7 @@ package org.keycloak.protocol.oidc; import org.keycloak.Config; import org.keycloak.events.EventBuilder; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.RealmModel; import org.keycloak.protocol.LoginProtocol; import org.keycloak.protocol.LoginProtocolFactory; @@ -20,10 +21,12 @@ public class OIDCLoginProtocolFactory implements LoginProtocolFactory { @Override public void init(Config.Scope config) { - System.out.println("here"); - } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } @Override public Object createProtocolEndpoint(RealmModel realm, EventBuilder event, AuthenticationManager authManager) { return new OIDCLoginProtocolService(realm, event, authManager); diff --git a/services/src/main/java/org/keycloak/protocol/oidc/mappers/AbstractOIDCProtocolMapper.java b/services/src/main/java/org/keycloak/protocol/oidc/mappers/AbstractOIDCProtocolMapper.java index dc949834d9..6e25a7a88c 100755 --- a/services/src/main/java/org/keycloak/protocol/oidc/mappers/AbstractOIDCProtocolMapper.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/mappers/AbstractOIDCProtocolMapper.java @@ -2,6 +2,7 @@ package org.keycloak.protocol.oidc.mappers; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.protocol.ProtocolMapper; import org.keycloak.protocol.oidc.OIDCLoginProtocol; @@ -30,4 +31,8 @@ public abstract class AbstractOIDCProtocolMapper implements ProtocolMapper { public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } } diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java b/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java index 60229b1736..fba6c56d7c 100755 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java +++ b/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java @@ -47,6 +47,11 @@ public class DummyUserFederationProviderFactory implements UserFederationProvide } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/AssertEvents.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/AssertEvents.java index c8b41c2b14..13c181bfac 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/AssertEvents.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/AssertEvents.java @@ -15,6 +15,7 @@ import org.keycloak.events.EventListenerProviderFactory; import org.keycloak.events.EventType; import org.keycloak.models.ClientModel; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.RealmModel; import org.keycloak.models.UserModel; import org.keycloak.models.UserSessionModel; @@ -201,6 +202,11 @@ public class AssertEvents implements TestRule, EventListenerProviderFactory { public void init(Config.Scope config) { } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { } diff --git a/timer/basic/src/main/java/org/keycloak/timer/basic/BasicTimerProviderFactory.java b/timer/basic/src/main/java/org/keycloak/timer/basic/BasicTimerProviderFactory.java old mode 100644 new mode 100755 index 0069b2cfcd..6113d2200a --- a/timer/basic/src/main/java/org/keycloak/timer/basic/BasicTimerProviderFactory.java +++ b/timer/basic/src/main/java/org/keycloak/timer/basic/BasicTimerProviderFactory.java @@ -2,6 +2,7 @@ package org.keycloak.timer.basic; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.timer.TimerProvider; import org.keycloak.timer.TimerProviderFactory; @@ -29,6 +30,11 @@ public class BasicTimerProviderFactory implements TimerProviderFactory { timer = new Timer(); } + @Override + public void postInit(KeycloakSessionFactory factory) { + + } + @Override public void close() { timer.cancel();