Package org.reficio.ws.it.util

Examples of org.reficio.ws.it.util.SslTunnel.start()


    @Test
    public void testService1_httpsProxy_noAuthentication() throws Exception {

        KeyStore ks = readKeyStore(getKeyStoreUrlOne(), getKeyStorePassword(), "JKS");
        SslTunnel tunnel = new SslTunnel(ks, getKeyStorePassword(), 9898, "localhost", 9797);
        tunnel.start();

        HttpProxyServer proxyServer = initProxy();
        try {

            final Security securityContext = Security.builder()
View Full Code Here


    @Test
    public void testService1_httpProxy_basicAuthentication_success() throws Exception {

        KeyStore ks = readKeyStore(getKeyStoreUrlOne(), getKeyStorePassword(), "JKS");
        SslTunnel tunnel = new SslTunnel(ks, getKeyStorePassword(), 9898, "localhost", 9797);
        tunnel.start();

        HttpProxyServer proxyServer = initProxy();
        proxyServer.addProxyAuthenticationHandler(new ProxyAuthorizationHandler() {
            @Override
            public boolean authenticate(String user, String pass) {
View Full Code Here

        exception.expect(TransmissionException.class);
        exception.expectMessage("[407]");

        KeyStore ks = readKeyStore(getKeyStoreUrlOne(), getKeyStorePassword(), "JKS");
        SslTunnel tunnel = new SslTunnel(ks, getKeyStorePassword(), 9898, "localhost", 9797);
        tunnel.start();

        HttpProxyServer proxyServer = initProxy();

        proxyServer.addProxyAuthenticationHandler(new ProxyAuthorizationHandler() {
            @Override
View Full Code Here

        exception.expect(SoapClientException.class);
        exception.expectMessage("peer not authenticated");

        KeyStore ks = readKeyStore(getKeyStoreUrlTwo(), getKeyStorePassword(), "JKS");
        SslTunnel tunnel = new SslTunnel(ks, getKeyStorePassword(), 9898, "localhost", 9797);
        tunnel.start();

        HttpProxyServer proxyServer = initProxy();

        proxyServer.addProxyAuthenticationHandler(new ProxyAuthorizationHandler() {
            @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.