ProviderFactory.postInit()

This commit is contained in:
Bill Burke 2015-02-23 12:11:48 -05:00
parent d06b7a47ac
commit 100dbd5fd7
52 changed files with 300 additions and 2 deletions

View file

@ -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 AbstractIdentityProviderFactory<T extends IdentityProvider
}
@Override
public void postInit(KeycloakSessionFactory factory) {
}
@Override
public T create(KeycloakSession session) {
return null;

View file

@ -9,6 +9,7 @@ import org.infinispan.manager.EmbeddedCacheManager;
import org.jboss.logging.Logger;
import org.keycloak.Config;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
import javax.naming.InitialContext;
@ -50,6 +51,11 @@ public class DefaultInfinispanConnectionProviderFactory implements InfinispanCon
this.config = config;
}
@Override
public void postInit(KeycloakSessionFactory factory) {
}
private void lazyInit() {
if (cacheManager == null) {
synchronized (this) {

View file

@ -4,6 +4,7 @@ import org.keycloak.Config;
import org.keycloak.connections.jpa.updater.JpaUpdaterProvider;
import org.keycloak.connections.jpa.updater.JpaUpdaterProviderFactory;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
/**
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
@ -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() {
}

View file

@ -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) {

View file

@ -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) {

View file

@ -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 <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
@ -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() {
}

View file

@ -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() {
}

View file

@ -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 <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
@ -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() {
}

View file

@ -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() {
}

View file

@ -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() {
}

View file

@ -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() {
}

View file

@ -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() {
}

View file

@ -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;

View file

@ -87,6 +87,11 @@ public abstract class BasePropertiesFederationFactory implements UserFederationP
}
@Override
public void postInit(KeycloakSessionFactory factory) {
}
@Override
public void close() {

View file

@ -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() {
}

View file

@ -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() {
}

View file

@ -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() {
}

View file

@ -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() {
}

View file

@ -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() {
}

View file

@ -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() {
}

View file

@ -60,6 +60,11 @@ public class KerberosFederationProviderFactory implements UserFederationProvider
}
@Override
public void postInit(KeycloakSessionFactory factory) {
}
@Override
public void close() {

View file

@ -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() {

View file

@ -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 <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
@ -23,6 +24,10 @@ public class FreeMarkerAccountProviderFactory implements AccountProviderFactory
freeMarker = new FreeMarkerUtil();
}
@Override
public void postInit(KeycloakSessionFactory factory) {
}
@Override
public void close() {
freeMarker = null;

View file

@ -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() {
}

View file

@ -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 <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
@ -22,6 +23,11 @@ public class DefaultKeycloakThemeProviderFactory implements ThemeProviderFactory
themeProvider = new DefaultKeycloakThemeProvider();
}
@Override
public void postInit(KeycloakSessionFactory factory) {
}
@Override
public void close() {
themeProvider = null;

View file

@ -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() {

View file

@ -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 <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
@ -23,6 +24,11 @@ public class FreeMarkerEmailProviderFactory implements EmailProviderFactory {
freeMarker = new FreeMarkerUtil();
}
@Override
public void postInit(KeycloakSessionFactory factory) {
}
@Override
public void close() {
freeMarker = null;

View file

@ -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 <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
@ -23,6 +24,10 @@ public class FreeMarkerLoginFormsProviderFactory implements LoginFormsProviderFa
freeMarker = new FreeMarkerUtil();
}
@Override
public void postInit(KeycloakSessionFactory factory) {
}
@Override
public void close() {
freeMarker = null;

View file

@ -2,6 +2,7 @@ package org.keycloak.provider;
import org.keycloak.Config;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
/**
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
@ -12,6 +13,11 @@ public interface ProviderFactory<T extends Provider> {
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();

View file

@ -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() {
}

View file

@ -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() {
}

View file

@ -2,6 +2,7 @@ package org.keycloak.models.cache;
import org.keycloak.Config;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
@ -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.

View file

@ -2,6 +2,7 @@ package org.keycloak.models.cache;
import org.keycloak.Config;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
@ -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.

View file

@ -2,6 +2,7 @@ package org.keycloak.models.cache;
import org.keycloak.Config;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
@ -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";

View file

@ -2,6 +2,7 @@ package org.keycloak.models.cache;
import org.keycloak.Config;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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);

View file

@ -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);

View file

@ -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() {
}

View file

@ -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;

View file

@ -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();

View file

@ -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() {
}

View file

@ -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() {
}

View file

@ -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 <a href="mailto:bill@burkecentral.com">Bill Burke</a>
@ -22,6 +23,11 @@ public class AerogearThemeProviderFactory implements ThemeProviderFactory {
theme = new AerogearThemeProvider();
}
@Override
public void postInit(KeycloakSessionFactory factory) {
}
@Override
public void close() {

View file

@ -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 <a href="mailto:bill@burkecentral.com">Bill Burke</a>
@ -25,6 +26,10 @@ public class EntityDescriptorImporterFactory implements ApplicationImporterFacto
}
@Override
public void postInit(KeycloakSessionFactory factory) {
}
@Override
public void close() {

View file

@ -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() {

View file

@ -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);

View file

@ -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) {
}
}

View file

@ -47,6 +47,11 @@ public class DummyUserFederationProviderFactory implements UserFederationProvide
}
@Override
public void postInit(KeycloakSessionFactory factory) {
}
@Override
public void close() {

View file

@ -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() {
}

View file

@ -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();