Search in sources :

Example 1 with KeystoneOpsSystemModule

use of org.platformlayer.auth.keystone.KeystoneOpsSystemModule 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);
}
Also used : KeystoneOpsSystemModule(org.platformlayer.auth.keystone.KeystoneOpsSystemModule) KeystoneJdbcModule(org.platformlayer.auth.KeystoneJdbcModule) CacheModule(org.platformlayer.cache.CacheModule) TokensResource(org.openstack.keystone.resources.admin.TokensResource) CodahaleMetricsModule(org.platformlayer.metrics.client.codahale.CodahaleMetricsModule) ConfigurationModule(org.platformlayer.config.ConfigurationModule) Injector(com.google.inject.Injector) GuiceAuthenticationConfig(org.platformlayer.auth.server.GuiceAuthenticationConfig) JerseyServletModule(com.sun.jersey.guice.JerseyServletModule) GuiceContainer(com.sun.jersey.guice.spi.container.servlet.GuiceContainer) Module(com.google.inject.Module) CodahaleMetricsModule(org.platformlayer.metrics.client.codahale.CodahaleMetricsModule) JerseyServletModule(com.sun.jersey.guice.JerseyServletModule) ConfigurationModule(org.platformlayer.config.ConfigurationModule) CacheModule(org.platformlayer.cache.CacheModule) KeystoneJdbcModule(org.platformlayer.auth.KeystoneJdbcModule) KeystoneOpsSystemModule(org.platformlayer.auth.keystone.KeystoneOpsSystemModule) KeychainResource(org.openstack.keystone.resources.admin.KeychainResource) ServicesResource(org.openstack.keystone.resources.admin.ServicesResource) PkiResource(org.openstack.keystone.resources.admin.PkiResource) Map(java.util.Map)

Aggregations

Injector (com.google.inject.Injector)1 Module (com.google.inject.Module)1 JerseyServletModule (com.sun.jersey.guice.JerseyServletModule)1 GuiceContainer (com.sun.jersey.guice.spi.container.servlet.GuiceContainer)1 Map (java.util.Map)1 KeychainResource (org.openstack.keystone.resources.admin.KeychainResource)1 PkiResource (org.openstack.keystone.resources.admin.PkiResource)1 ServicesResource (org.openstack.keystone.resources.admin.ServicesResource)1 TokensResource (org.openstack.keystone.resources.admin.TokensResource)1 KeystoneJdbcModule (org.platformlayer.auth.KeystoneJdbcModule)1 KeystoneOpsSystemModule (org.platformlayer.auth.keystone.KeystoneOpsSystemModule)1 GuiceAuthenticationConfig (org.platformlayer.auth.server.GuiceAuthenticationConfig)1 CacheModule (org.platformlayer.cache.CacheModule)1 ConfigurationModule (org.platformlayer.config.ConfigurationModule)1 CodahaleMetricsModule (org.platformlayer.metrics.client.codahale.CodahaleMetricsModule)1