Search in sources :

Example 1 with SecureServerExposerFactory

use of org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.SecureServerExposerFactory in project che-server by eclipse-che.

the class WsMasterModule method installDefaultSecureServerExposer.

private void installDefaultSecureServerExposer(String infrastructure) {
    if (KubernetesInfrastructure.NAME.equals(infrastructure)) {
        MapBinder<String, SecureServerExposerFactory<KubernetesEnvironment>> secureServerExposerFactories = MapBinder.newMapBinder(binder(), new TypeLiteral<>() {
        }, new TypeLiteral<>() {
        });
        install(new FactoryModuleBuilder().implement(new TypeLiteral<SecureServerExposer<KubernetesEnvironment>>() {
        }, new TypeLiteral<PassThroughProxySecureServerExposer<KubernetesEnvironment>>() {
        }).build(new TypeLiteral<PassThroughProxySecureServerExposerFactory<KubernetesEnvironment>>() {
        }));
        secureServerExposerFactories.addBinding("default").to(new TypeLiteral<PassThroughProxySecureServerExposerFactory<KubernetesEnvironment>>() {
        });
    } else {
        MapBinder<String, SecureServerExposerFactory<OpenShiftEnvironment>> secureServerExposerFactories = MapBinder.newMapBinder(binder(), new TypeLiteral<>() {
        }, new TypeLiteral<>() {
        });
        install(new FactoryModuleBuilder().implement(new TypeLiteral<SecureServerExposer<OpenShiftEnvironment>>() {
        }, new TypeLiteral<PassThroughProxySecureServerExposer<OpenShiftEnvironment>>() {
        }).build(new TypeLiteral<PassThroughProxySecureServerExposerFactory<OpenShiftEnvironment>>() {
        }));
        secureServerExposerFactories.addBinding("default").to(new TypeLiteral<PassThroughProxySecureServerExposerFactory<OpenShiftEnvironment>>() {
        });
    }
}
Also used : PassThroughProxySecureServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.PassThroughProxySecureServerExposer) SecureServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.SecureServerExposer) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) PassThroughProxySecureServerExposerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.PassThroughProxySecureServerExposerFactory) OpenShiftEnvironment(org.eclipse.che.workspace.infrastructure.openshift.environment.OpenShiftEnvironment) TypeLiteral(com.google.inject.TypeLiteral) JwtProxySecureServerExposerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.JwtProxySecureServerExposerFactory) PassThroughProxySecureServerExposerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.PassThroughProxySecureServerExposerFactory) SecureServerExposerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.SecureServerExposerFactory) PassThroughProxySecureServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.PassThroughProxySecureServerExposer) KubernetesEnvironment(org.eclipse.che.workspace.infrastructure.kubernetes.environment.KubernetesEnvironment)

Example 2 with SecureServerExposerFactory

use of org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.SecureServerExposerFactory in project devspaces-images by redhat-developer.

the class WsMasterModule method installDefaultSecureServerExposer.

private void installDefaultSecureServerExposer(String infrastructure) {
    if (KubernetesInfrastructure.NAME.equals(infrastructure)) {
        MapBinder<String, SecureServerExposerFactory<KubernetesEnvironment>> secureServerExposerFactories = MapBinder.newMapBinder(binder(), new TypeLiteral<>() {
        }, new TypeLiteral<>() {
        });
        install(new FactoryModuleBuilder().implement(new TypeLiteral<SecureServerExposer<KubernetesEnvironment>>() {
        }, new TypeLiteral<PassThroughProxySecureServerExposer<KubernetesEnvironment>>() {
        }).build(new TypeLiteral<PassThroughProxySecureServerExposerFactory<KubernetesEnvironment>>() {
        }));
        secureServerExposerFactories.addBinding("default").to(new TypeLiteral<PassThroughProxySecureServerExposerFactory<KubernetesEnvironment>>() {
        });
    } else {
        MapBinder<String, SecureServerExposerFactory<OpenShiftEnvironment>> secureServerExposerFactories = MapBinder.newMapBinder(binder(), new TypeLiteral<>() {
        }, new TypeLiteral<>() {
        });
        install(new FactoryModuleBuilder().implement(new TypeLiteral<SecureServerExposer<OpenShiftEnvironment>>() {
        }, new TypeLiteral<PassThroughProxySecureServerExposer<OpenShiftEnvironment>>() {
        }).build(new TypeLiteral<PassThroughProxySecureServerExposerFactory<OpenShiftEnvironment>>() {
        }));
        secureServerExposerFactories.addBinding("default").to(new TypeLiteral<PassThroughProxySecureServerExposerFactory<OpenShiftEnvironment>>() {
        });
    }
}
Also used : PassThroughProxySecureServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.PassThroughProxySecureServerExposer) SecureServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.SecureServerExposer) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) PassThroughProxySecureServerExposerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.PassThroughProxySecureServerExposerFactory) OpenShiftEnvironment(org.eclipse.che.workspace.infrastructure.openshift.environment.OpenShiftEnvironment) TypeLiteral(com.google.inject.TypeLiteral) JwtProxySecureServerExposerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.JwtProxySecureServerExposerFactory) PassThroughProxySecureServerExposerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.PassThroughProxySecureServerExposerFactory) SecureServerExposerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.SecureServerExposerFactory) PassThroughProxySecureServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.PassThroughProxySecureServerExposer) KubernetesEnvironment(org.eclipse.che.workspace.infrastructure.kubernetes.environment.KubernetesEnvironment)

Aggregations

TypeLiteral (com.google.inject.TypeLiteral)2 FactoryModuleBuilder (com.google.inject.assistedinject.FactoryModuleBuilder)2 KubernetesEnvironment (org.eclipse.che.workspace.infrastructure.kubernetes.environment.KubernetesEnvironment)2 SecureServerExposer (org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.SecureServerExposer)2 SecureServerExposerFactory (org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.SecureServerExposerFactory)2 PassThroughProxySecureServerExposer (org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.PassThroughProxySecureServerExposer)2 JwtProxySecureServerExposerFactory (org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.JwtProxySecureServerExposerFactory)2 PassThroughProxySecureServerExposerFactory (org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.PassThroughProxySecureServerExposerFactory)2 OpenShiftEnvironment (org.eclipse.che.workspace.infrastructure.openshift.environment.OpenShiftEnvironment)2