use of org.platformlayer.auth.KeystoneJdbcModule in project platformlayer by platformlayer.
the class KeystoneAdminServer method main.
public static void main(String[] args) throws Exception {
List<Module> modules = Lists.newArrayList();
modules.add(new ConfigurationModule());
modules.add(new CacheModule());
modules.add(new GuiceAuthenticationConfig());
modules.add(new KeystoneJdbcModule());
modules.add(new KeystoneOpsSystemModule());
modules.add(new CodahaleMetricsModule());
modules.add(new JerseyServletModule() {
@Override
protected void configureServlets() {
bind(TokensResource.class);
bind(KeychainResource.class);
bind(PkiResource.class);
bind(ServicesResource.class);
Map<String, String> params = Maps.newHashMap();
params.put(PackagesResourceConfig.PROPERTY_PACKAGES, "org.openstack.keystone.jaxrs;org.codehaus.jackson.jaxrs");
serve("/*").with(GuiceContainer.class, params);
}
});
Injector injector = Guice.createInjector(modules);
KeystoneAdminServer server = injector.getInstance(KeystoneAdminServer.class);
server.start(WellKnownPorts.PORT_PLATFORMLAYER_AUTH_ADMIN);
}
use of org.platformlayer.auth.KeystoneJdbcModule in project platformlayer by platformlayer.
the class KeystoneCliContext method connect.
@Override
public void connect() throws Exception {
Properties properties = options.getConfigurationProperties();
ConfigurationImpl configuration = ConfigurationImpl.from(new File("."), properties);
List<Module> modules = Lists.newArrayList();
modules.add(new ConfigurationModule(configuration));
modules.add(new KeystoneJdbcModule());
modules.add(new NullMetricsModule());
this.injector = Guice.createInjector(modules);
}
use of org.platformlayer.auth.KeystoneJdbcModule in project platformlayer by platformlayer.
the class KeystoneUserServer method main.
public static void main(String[] args) throws Exception {
List<Module> modules = Lists.newArrayList();
ConfigurationModule configurationModule = new ConfigurationModule();
modules.add(configurationModule);
Discovery discovery = Discovery.build();
ConfigurationImpl configuration = configurationModule.getConfiguration();
Extensions extensions = new Extensions(configuration, discovery);
modules.add(new CacheModule());
modules.add(new GuiceAuthenticationConfig());
modules.add(new KeystoneJdbcModule());
modules.add(new KeystoneOpsUserModule());
modules.add(new CodahaleMetricsModule());
modules.add(new UserAuthServletModule(extensions));
Injector injector = Guice.createInjector(modules);
KeystoneUserServer server = injector.getInstance(KeystoneUserServer.class);
server.start(WellKnownPorts.PORT_PLATFORMLAYER_AUTH_USER);
}
Aggregations