Load SecureStore implementation from site lib dir
This approach shares core ideas of the servlet filter and is alternative approach to secure store plugin. To use this extension additional jar file needs to be put in $site_path/lib directory and gerrit.secureStoreClass property needs to be added to gerrit.config file. This property must contain fully qualified class name that implements com.google.gerrit.server.securestore.SecureStore interface. During Gerrit start up the class configured with the gerrit.secureStoreClass will be loaded and the SecureStore interface will be bound to it. Change-Id: I90972d28ecab0818d782c3d43acb8c70ba598d12 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
This commit is contained in:
@@ -30,6 +30,7 @@ import com.google.gerrit.server.schema.DataSourceProvider;
|
||||
import com.google.gerrit.server.schema.DataSourceType;
|
||||
import com.google.gerrit.server.schema.DatabaseModule;
|
||||
import com.google.gerrit.server.schema.SchemaModule;
|
||||
import com.google.gerrit.server.securestore.SecureStore;
|
||||
import com.google.gwtorm.server.OrmException;
|
||||
import com.google.inject.AbstractModule;
|
||||
import com.google.inject.Binding;
|
||||
@@ -96,6 +97,7 @@ public abstract class SiteProgram extends AbstractProgram {
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(File.class).annotatedWith(SitePath.class).toInstance(sitePath);
|
||||
bind(SecureStore.class).toProvider(SecureStoreProvider.class);
|
||||
}
|
||||
};
|
||||
modules.add(sitePathModule);
|
||||
|
||||
Reference in New Issue
Block a user